> ## Documentation Index
> Fetch the complete documentation index at: https://closedloop.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Typeform

> Pipe Typeform responses into ClosedLoop AI: NPS scores, churn surveys, beta feedback. Open-ended answers become themed insights you can query.

Connect Typeform to ClosedLoop AI and survey responses become scored product intelligence the moment they're submitted. NPS scores, open-ended responses, and structured answers are analyzed in real-time, enriched with CRM context, and merged with intelligence from all your other sources.

## What Gets Imported

| Data           | Description                                                   |
| -------------- | ------------------------------------------------------------- |
| Form responses | All answer types (text, choice, rating, email, etc.)          |
| Customer info  | Identified via hidden fields (`customer_id`, `email`, `name`) |
| Form metadata  | Form ID, submission timestamp, response token                 |
| Variables      | Programmatic data passed via Typeform variables               |

<Tip>Use Typeform's **hidden fields** to pass customer identification (email, customer ID, name) with each response. This enables ClosedLoop AI to attribute responses to specific customer accounts.</Tip>

## Connection Method

Typeform uses **webhook-based** data delivery. You configure a webhook in Typeform that sends responses to ClosedLoop AI's webhook endpoint. Responses are verified using HMAC-SHA256 signatures.

## Setup Guide

<AccordionGroup>
  <Accordion icon="key" title="Step 1: Get your webhook secret">
    1. In ClosedLoop AI, go to **Settings** → **API Keys**
    2. Generate a new **Webhook Key**
    3. Copy the secret. You'll need it in the next step
  </Accordion>

  <Accordion icon="plug" title="Step 2: Configure the webhook in Typeform">
    1. Open your form in [Typeform](https://admin.typeform.com)
    2. Go to **Connect** → **Webhooks**
    3. Click **Add a webhook**
    4. Set the **Destination URL** to:
       ```
       https://mcp.closedloop.sh/webhooks/surveys/typeform
       ```
    5. Set the **Secret** to your ClosedLoop AI webhook secret
    6. Toggle the webhook **On**
    7. Click **Send test request** to verify the connection
  </Accordion>

  <Accordion icon="user" title="Step 3: Add hidden fields (recommended)">
    To associate responses with customer accounts, add hidden fields to your Typeform:

    1. In your form settings, go to **Hidden Fields**
    2. Add fields: `customer_id`, `email`, `name`
    3. When sharing the form, pass values in the URL:
       ```
       https://yourform.typeform.com/to/abc123#customer_id=cust_12345&email=jane@example.com&name=Jane+Smith
       ```

    ClosedLoop AI automatically extracts these fields for customer attribution.
  </Accordion>
</AccordionGroup>

## Webhook Verification

Typeform signs webhook payloads using HMAC-SHA256 with **base64 encoding**. ClosedLoop AI verifies every incoming webhook:

1. Typeform sends the signature in the `typeform-signature` header
2. ClosedLoop AI computes the expected signature using your webhook secret
3. Signatures are compared using timing-safe comparison to prevent timing attacks
4. Requests with invalid signatures are rejected with a `401` status

## Supported Answer Types

ClosedLoop AI processes all Typeform answer types:

| Type                     | Example                          |
| ------------------------ | -------------------------------- |
| Text / Long text         | Open-ended responses             |
| Choice / Multiple choice | Single or multi-select answers   |
| Rating / Opinion scale   | NPS scores, satisfaction ratings |
| Email                    | Respondent email address         |
| Number                   | Numeric responses                |
| Date                     | Date selections                  |
| Yes/No                   | Boolean answers                  |
| File upload              | Uploaded file URLs               |
| Payment                  | Payment information              |

## Configuration

* **Real-time delivery**: Responses arrive within seconds of submission
* **Test mode**: Typeform test webhooks are acknowledged but not processed
* **No polling required**: Webhook-based, so there's nothing to configure for sync timing

## What to Expect

Once configured, ClosedLoop AI will:

1. **Receive responses in real-time** as customers submit your Typeform
2. **Extract customer identity** from hidden fields and variables
3. **Analyze with AI**: extract product insights, scored by business impact
4. **Surface intelligence** in your dashboard and via MCP alongside all your other sources

<Card title="View Webhook Docs" icon="webhook" href="/docs/integrations/webhooks">
  Learn more about webhook authentication and payload formats
</Card>
