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

# Zapier

> Trigger Trikon Voice calls and create leads from Zapier using Webhooks by Zapier.

[Zapier](https://zapier.com) connects forms, CRMs, and spreadsheets to Trikon Voice without writing a server. Use **Webhooks by Zapier** (or **Code by Zapier** if you need extra mapping) to POST to the same endpoints as any other client.

The developer leads routes (`/api/developer/leads`) accept the field names Zapier and Meta lead ads typically send (`phone`, `phone_number`, `full_name`, `notes`, `source`).

## Before you start

* A Zapier account that can use **Webhooks by Zapier**.
* Trikon API key, workspace slug, outbound agent ID, and phone-line UUID.

Create a Zapier **Storage** or note the key only in the Webhooks action’s Headers box. Do not print it in a Slack step.

## Zap A — form submit starts a call

<Steps>
  <Step title="Trigger">
    e.g. **Google Forms**, **Typeform**, **HubSpot**, or **Facebook Lead Ads**. Map a phone field; normalise to E.164 if the form stores local numbers.
  </Step>

  <Step title="Action: Webhooks by Zapier → POST">
    * URL: `https://voice.trikon.tech/api/outbound-call`
    * Payload type: `JSON`
    * Headers:
      * `Authorization`: `Bearer YOUR_API_KEY`
      * `Content-Type`: `application/json`
    * Data:

    | Key          | Example              |
    | ------------ | -------------------- |
    | `to`         | `{{phone}}`          |
    | `agentId`    | your agent UUID      |
    | `enterprise` | `acmeclinic`         |
    | `from`       | your phone-line UUID |
    | `name`       | `{{name}}`           |

    Nested metadata: either add a **Code** step that builds `{ "metadata": { "amount_due": ... } }`, or pass extra keys only if your script uses matching `{{placeholders}}` via the `metadata` object (see [Make a call](/developers/make-a-call)).
  </Step>

  <Step title="Test">
    Run the Zap against your own number. You should get `success: true` and a `callUuid`. Check **Call Logs**.
  </Step>
</Steps>

## Zap B — create a lead in Trikon (then optionally call)

Use this when you want the person in **Leads** before or instead of an immediate ring.

**Action: Webhooks by Zapier → POST**

* URL: `https://voice.trikon.tech/api/developer/leads`
* Same `Authorization` header as above
* JSON body:

```json theme={null}
{
  "enterprise": "acmeclinic",
  "agentId": "8f2c1d34-5b6a-4c7e-9f10-2a3b4c5d6e7f",
  "name": "Asha",
  "phone": "+919845012345",
  "notes": "Requested a callback from the website",
  "source": "zapier"
}
```

A successful create returns `201` with `lead.id`.

To ring that lead in a second step:

* URL: `https://voice.trikon.tech/api/developer/leads/{{lead_id}}/call`
* Method: `POST`
* Same Bearer header (body can be empty)

You can also POST to `/api/developer/agents/{agentId}/leads` if you always attach leads to one agent.

## Zap C — webhook in: call finished → CRM

Trikon can only store **one** webhook URL per workspace. If Zapier should receive events:

<Steps>
  <Step title="Catch Hook">
    Add a Zap with **Webhooks by Zapier → Catch Hook**. Copy the custom webhook URL.
  </Step>

  <Step title="Save it in Trikon">
    **Settings → Developer API → Call webhook**.
  </Step>

  <Step title="Filter">
    Continue only when `event` is `call.completed` or `analysis.completed`, depending on whether you need the transcript immediately or the AI `intent` / `summary`.
  </Step>

  <Step title="Update your CRM">
    Map `to`, `name`, `intent`, `summary`, and `recordingUrl` into HubSpot, Sheets, or Slack. Return quickly — Zapier’s Catch Hook acknowledges the POST; keep downstream steps light so you are not waiting on a user.
  </Step>
</Steps>

Event names and payload fields: [Webhooks](/developers/webhooks).

<Warning>
  Regenerating the workspace API key in **Settings → Developer API** breaks every Zap that still uses the old Bearer token. Update the header in each Webhooks step on the same day.
</Warning>
