> For the complete documentation index, see [llms.txt](https://popin.gitbook.io/popin-developer-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://popin.gitbook.io/popin-developer-hub/zapier-integration.md).

# Zapier Integration

## **Popin – Zapier Integration Guide**

Integrate **Popin** with thousands of third-party apps via **Zapier** to automate workflows such as lead creation, call tracking, CRM updates, and more. This guide walks you through connecting Popin to Zapier, configuring triggers, and using API endpoints for authentication and webhook subscription.

***

### **📘 Overview**

The **Popin Zapier App** enables seamless automation by providing pre-defined event triggers. You can integrate Popin with tools like Google Sheets, Slack, HubSpot, Salesforce, Calendars, and more, using Zapier’s no-code interface.

***

### **✅ Prerequisites**

Before you begin, ensure you have:

* An active **Popin** account with **admin access**.
* An active **Zapier** account.
* A valid **Popin API Key**.

***

### **🔑 Getting Your API Key**

1. Log in to your **Popin Dashboard**.
2. Navigate to: `Developers > Zapier`.
3. Click **Setup**.
4. Click **Generate API Key**.
5. Copy and store the API Key securely — this will be used in Zapier for authentication.

***

### **🔗 Connecting Popin to Zapier**

1. Log in to your **Zapier** account.
2. Go to **My Apps**.
3. Click **Add a Connection**, then search for and select **Popin**.
4. When prompted, enter the **API Key** you obtained from the Popin dashboard.
5. Click **Continue** to authenticate and complete the connection.

***

### **⚡ Available Triggers**

Popin offers the following **Zapier triggers** to automate actions based on customer and call events:

***

#### **1. New Scheduled Call**

* **Trigger Key:** `popin_scheduled_notification`
* **Fires when** a call is scheduled by the customer.

**Sample Payload:**

```json
{
  "phoneNumber": "9876543210",
  "countryCode": "+91",
  "email": "test@tester.com",
  "customerName": "John Doe",
  "time": "10:00 AM",
  "date": "2022-01-01",
  "url": "https://popin.to/join/212345",
  "language": "en",
  "custom_1": "Category 1",
  "custom_2": "Category 2",
  "viewed": "https://yoursite.com/product/12345 | https://yoursite.com/product2/6789"
}
```

***

#### **2. New Missed Call**

* **Trigger Key:** `popin_missed_notification`
* **Fires when** a customer call is missed.

**Sample Payload:**

```json
{
  "phoneNumber": "9538218000",
  "countryCode": "+91",
  "email": "tester@test.com",
  "customerName": "John Doe"
}
```

***

#### **3. User Captured**

* **Trigger Key:** `popin_user_captured`
* **Fires when** a user submits contact information through Popin.

**Sample Payload:**

```json
{
  "phoneNumber": "9876543210",
  "countryCode": "+91",
  "email": "tester@test.com",
  "customerName": "John Doe",
  "utm_source": "google",
  "utm_medium": "cpc",
  "utm_campaign": "new_campaign",
  "utm_term": "product_term",
  "utm_content": "ad_content",
  "extra": "extra_data"
}
```

***

#### **4. Call Successful**

* **Trigger Key:** `popin_call_successful`
* **Fires when** a call is completed successfully.

**Sample Payload:**

```json
{
  "phoneNumber": "9876543210",
  "countryCode": "+91",
  "email": "tester@test.com",
  "customerName": "John Doe",
  "agentName": "Vijth"
}
```

***

### **🔌 API Endpoints**

#### **1. Authentication Endpoint**

Used to validate the Popin API Key during account connection in Zapier.

* **Endpoint:** `https://widget01.popin.to/zapier/v1/auth`
* **Method:** `POST`

**Request Parameters:**

| Parameter | Type   | Required | Description                          |
| --------- | ------ | -------- | ------------------------------------ |
| api\_key  | string | Yes      | API key generated in Popin dashboard |

**Success Response:**

```json
{
  "status": 1,
  "account": "Seller Account Name"
}
```

**Failure Response:**

```json
{
  "status": 0,
  "message": "Invalid API KEY"
}
```

***

#### **2. Webhook Subscription Endpoint**

Used by Zapier to register a webhook for a selected Popin trigger.

* **Endpoint:** `https://widget01.popin.to/zapier/v1/subscribe`
* **Method:** `POST`

**Request Parameters:**

| Parameter | Type   | Required | Description                  |
| --------- | ------ | -------- | ---------------------------- |
| api\_key  | string | Yes      | API key from Popin dashboard |
| type      | string | Yes      | Trigger type (event key)     |
| hookUrl   | string | Yes      | Webhook URL from Zapier      |

**Success Response:**

```json
{
  "message": "Webhook received"
}
```

**Failure Response:**

```json
{
  "message": "Webhook failed"
}
```

***

### **💡 Example Use Cases**

Here are common workflows automated using Popin + Zapier:

| Use Case                                        | Description                                                   |
| ----------------------------------------------- | ------------------------------------------------------------- |
| **Sync New Scheduled Calls to Google Calendar** | Automatically create calendar events for scheduled calls.     |
| **Send Missed Call Alerts to Slack**            | Instantly notify your team when a customer call is missed.    |
| **Add Captured Users to CRM**                   | Add new captured contacts to CRMs like HubSpot or Salesforce. |
| **Log Completed Calls to Google Sheets**        | Maintain call logs for reporting and tracking purposes.       |

***

### **🛠️ Support**

If you encounter any issues while setting up the Zapier integration:

* Verify your **API Key** is valid and active.
* Ensure your Zapier **webhook URL** is accessible.
* Check for **network restrictions** or firewall rules.

📨 Contact Popin Support:\
**Email:** <support@popin.to>
