# Sending Lead Data to Zapier

### 🔁 Objective:

Send **Lead data** (like name, email, phone, tags, etc.) from **Agent Supply** to **Zapier**, enabling you to automate actions such as CRM updates, email follow-ups, or Slack notifications.

***

### ✅ Prerequisites:

1. A **Zapier** account
2. Access to your **Agent Supply dashboard**
3. An **Agent Supply assistant** that collects lead data (e.g., via form, user message, or custom flow)

***

### 🧩 Step-by-Step Integration (Zapier Webhook)

#### **Step 1: Create a Zap in Zapier**

1. Log in to [Zapier.com](https://zapier.com)
2. Click **“Create Zap”**
3. For the **Trigger**, choose:\
   → **Webhooks by Zapier**\
   → Event: **Catch Hook**\
   → Click **Continue**

#### **Step 2: Copy Your Webhook URL**

1. Zapier will provide a **custom webhook URL**\
   (e.g., `https://hooks.zapier.com/hooks/catch/123456/abcde`)
2. **Copy** this URL for use in Agent Supply

***

### 🔗 Step 3: Set up a Webhook in Agent Supply

#### Option A: Use an **Action Step** inside your Agent Supply Assistant

If you're using an agent with defined actions or a flow:

1. Go to your agent’s flow in the Agent Supply dashboard.
2. Locate the step where the lead is captured.
3. Add an **"HTTP Request"** or **Webhook** step.
4. Set the method to **POST**
5. Paste in the **Zapier Webhook URL**
6. Structure the JSON payload. Example:

   ```json
   jsonCopiarEditar{
     "name": "{{user.name}}",
     "email": "{{user.email}}",
     "phone": "{{user.phone}}",
     "tags": "{{user.tags}}"
   }
   ```

   *(Replace `{{user.variable}}` with the actual variable names used in your assistant.)*
7. Save and deploy the flow.

#### Option B: Use Global Webhooks (if Agent Supply provides this)

Some Agent Supply projects allow **global webhook configuration**:

1. Navigate to project settings or integrations.
2. Look for “Webhook” or “Lead Forwarding” settings.
3. Paste the Zapier Webhook URL.
4. Define what event will trigger the webhook (e.g., “on lead creation”).
5. Customize the payload if needed.

***

### 🧪 Step 4: Test the Integration

1. Return to your Zap in Zapier.
2. Click **“Test Trigger”**
3. Submit a lead via your Agent Supply assistant (preview or live).
4. Zapier should receive the lead data.
5. Click **Continue** when the test succeeds.

***

### ⚙️ Step 5: Add Action Steps in Zapier

Once Zapier has received the lead data, you can choose what happens next:

* Send it to a CRM (e.g., Salesforce, Pipedrive, HubSpot)
* Log it in a spreadsheet
* Add to your email list
* Send internal alerts (e.g., Slack or Gmail)

Example:

1. Choose **“Create Contact in HubSpot”**
2. Map the lead fields (e.g., email → email)
3. Save and **turn your Zap on**

***

### ✅ Integration Complete!

Now each time a lead interacts with your **Agent Supply assistant**, the captured data is instantly sent to Zapier, triggering your custom workflow.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.agentsupply.ai/ai-features/leads-legacy/sending-lead-data-to-zapier.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
