> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.supersend.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# AI-Drafted Reply Workflows with Webhooks (n8n, Make, Zapier)

# AI-Drafted Reply Workflows with Webhooks (n8n, Make, Zapier)

## Purpose

This article is for teams that want to **automate Super Inbox replies** using an external AI (for example Claude or ChatGPT) and a workflow tool such as **n8n**, **Make**, or **Zapier**.

The pattern is a **round trip**:

1. SuperSend sends a **`reply`** webhook when a contact replies.
2. Your automation drafts a response with AI.
3. Your automation sends the draft back to SuperSend so it goes out **in the same email thread**.

You can add a human approval step between draft and send.

## Prerequisites

- A SuperSend account with **email** outreach running and replies landing in **Super Inbox**.
- A **Webhook** integration with the **Reply** event enabled.
- An automation tool that can receive HTTP webhooks and make HTTP requests (n8n, Make, Zapier, or custom code).
- Your SuperSend **API key** (required to send messages back—webhooks alone are outbound only).
- Permission to edit **Campaign** or **Org** integrations and to view **Admin** → **System** for the API key.

For webhook basics, event types, and delivery logs, see [Webhooks: Testing, Delivery Logs, and Payloads](https://help.supersend.io/en/article/webhooks-testing-delivery-logs-and-payloads-dbmbkb/) and [Webhooks: Replies, Bounces, and CRM Automation](https://help.supersend.io/en/article/webhooks-replies-bounces-and-crm-automation-glg697/).

---

## How the round trip works

```mermaid
sequenceDiagram
  participant Contact
  participant SuperSend
  participant Automation as n8n / Make / Zapier
  participant AI as AI (Claude, etc.)

  Contact->>SuperSend: Replies to campaign email
  SuperSend->>Automation: POST webhook (type: reply)
  Automation->>AI: Draft reply from reply.text + context
  AI-->>Automation: Suggested message
  Note over Automation: Optional human approval
  Automation->>SuperSend: POST send message API
  SuperSend->>Contact: Threaded reply from your mailbox
```

SuperSend handles **email threading** when you send through the conversation API—it uses the existing conversation history (`In-Reply-To`, `References`, provider thread IDs). You do **not** need to pass thread IDs from your automation.

---

## Step 1: Configure a Reply webhook in SuperSend

1. Go to **Campaign Settings** → **Integrations** (for one campaign) or **Admin** → **Integrations** → **Integration Library** → **Webhook** (for team-wide setup).
2. Add or edit a **Webhook** account and paste your automation URL (for example an n8n **Webhook** node URL).
3. Enable **only** the events your workflow needs. For AI reply drafting, turn on **Reply**.
4. For less noise, turn **Bounce** and **Autoresponse** **off** if you do not want those POSTs—or filter on **`type`** in your automation (see Step 2).
5. Save the integration.
6. Use **Test →** next to **Reply** with **Sample data** or **Real contact data** to confirm your URL receives POSTs. Test payloads include **`"test": true`**—branch on this so tests do not send real emails.

---

## Step 2: Filter for real replies in your automation

Every webhook body includes a top-level **`type`** field. Only continue your AI flow when:

```text
type === "reply"
```

You can also branch on AI classification fields when present:

- **`reply.category`** — intent (for example `interested`, `question`, `not_interested`)
- **`reply.mood`** — sentiment (`positive`, `negative`, `neutral`)
- **`reply.confidence`** — classifier confidence from `0` to `1`

Ignore requests where **`test`** is `true`.

---

## Step 3: Get your SuperSend API key

Sending a message back requires the V2 API (not the webhook URL alone).

1. Go to **Admin** → **System**.
2. In **IDs**, find **API Key** → **Copy**.

Store this in your automation tool's credential store—do not hardcode it in shared workflow exports.

---

## Step 4: Draft a reply with AI

Use the webhook payload as context for your AI step. Useful fields:

| Field | Use |
|-------|-----|
| **`reply.text`** | What the contact wrote |
| **`reply.subject`** | Email subject line |
| **`contact.email`**, **`contact.first_name`**, etc. | Personalization |
| **`contact.custom`** | Custom variables from import |
| **`conversationId`** | Required to send back into the correct thread |
| **`contact.Sender.id`** | Mailbox to send from, when present |
| **`contact.Sender.email`** | Human-readable mailbox address |

Example prompt pattern for your AI node:

> You are drafting a short, professional reply to a sales email. Contact: {{first_name}} at {{company_name}}. They wrote: "{{reply.text}}". Write a concise reply (2–4 sentences). Do not invent pricing or meetings we did not offer.

Add your own brand voice, compliance rules, and forbidden phrases.

**Optional — human in the loop:** Insert an approval step (Slack message, email, or n8n **Wait** node) before sending. Many teams only auto-send when **`reply.category`** is `interested` or `question` and route everything else to a human.

---

## Step 5: Send the draft back to SuperSend

Call the **Send Message** endpoint on the conversation from the webhook.

| Setting | Value |
|---------|--------|
| **Method** | `POST` |
| **URL** | `https://api.supersend.io/v2/conversations/{conversationId}/messages` |
| **Headers** | `Authorization`: `Bearer YOUR_API_KEY` |
| | `Content-Type`: `application/json` |

Replace `{conversationId}` with the **`conversationId`** from the webhook body.

**Body (JSON):**

```json
{
  "message": "Your AI-drafted reply text here.",
  "sender_id": "SENDER_UUID_FROM_WEBHOOK",
  "subject": "Re: Original subject"
}
```

| Field | Required | Notes |
|-------|----------|-------|
| **`message`** | Yes | Plain text or HTML (set **`is_html`** to `true` for HTML) |
| **`sender_id`** | Yes | Use **`contact.Sender.id`** from the webhook when available. Must be an active sender on the team. For Gmail and Outlook threads, use the **same mailbox** that sent the original outreach when possible. |
| **`subject`** | No | Defaults to `Re: {conversation title}` |

The API queues delivery asynchronously. A successful response includes **`status": "pending"`** and a **`job_id`**.

Full request and response reference: [Conversation API on docs.supersend.io](https://docs.supersend.io/docs/conversation#send-message).

---

## Example: n8n workflow outline

1. **Webhook** (trigger) — paste URL into SuperSend **Webhook** integration.
2. **IF** — `{{ $json.type }}` equals `reply` and `{{ $json.test }}` is not `true`.
3. **HTTP Request** (or **OpenAI** / **Anthropic** node) — draft reply using `reply.text` and contact fields.
4. **IF** (optional) — only continue if category is `interested` or `question`.
5. **Slack** or **Gmail** (optional) — approval before send.
6. **HTTP Request** — `POST` to `https://api.supersend.io/v2/conversations/{{ $json.conversationId }}/messages` with body from Step 5.

Make and Zapier follow the same pattern: **Webhooks** trigger → filter on **`type`** → AI step → **Webhooks** or **HTTP** action to SuperSend.

---

## Alternative: In-app Auto Reply Rules

For **fixed templates** triggered by mood or labels (no external AI), use **Super Inbox** → **Settings** → **Auto Replies**. That path stays entirely inside SuperSend and does not require webhooks or an API key.

See [Auto Reply Rules in Super Inbox](https://help.supersend.io/en/article/auto-reply-rules-in-super-inbox-jp9s4g/).

---

## Alternative: Claude with SuperSend MCP

If you use **Claude Desktop**, **Claude Code**, or **Cursor** with the SuperSend MCP server, Claude can list conversations and call **`send_conversation_message`** directly instead of you building the HTTP POST in n8n. That path is better for **interactive** drafting than high-volume unattended automation.

- [Connect SuperSend MCP to Claude](https://help.supersend.io/en/article/connect-supersend-mcp-to-claude-186qdf7/) (and the Cursor/Codex articles in the same category).

---

## Expected Result

- When a contact replies, your automation receives a **`reply`** webhook.
- After your AI (and optional approval) step, SuperSend sends your message **in the original thread**.
- The reply appears in **Super Inbox** on that conversation.
- The contact receives a normal threaded email from your sender mailbox.

Use **Admin** → **Integrations** → **Webhook** → **Details** → **Delivery Logs** or **Campaign Settings** → **Integrations** → **View logs** to confirm outbound webhook deliveries. Use your automation tool's execution history to confirm the send-back HTTP request succeeded.

---

## Troubleshooting

- **Issue:** Webhook fires but no message is sent back.  
  **Fix:** Confirm your automation calls `POST /v2/conversations/{conversationId}/messages` with a valid **API key**, not only the inbound webhook URL. Check your tool's error output for `401` (bad key) or `400` (missing `sender_id` on email).

- **Issue:** `sender_id is required for email conversations`.  
  **Fix:** Include **`contact.Sender.id`** from the reply webhook in the POST body. If it is missing, list senders via the API and pick the mailbox that sent the original sequence email for that contact. See [Conversation API](https://docs.supersend.io/docs/conversation#send-message).

- **Issue:** Reply sends from the wrong mailbox or fails on Gmail/Outlook.  
  **Fix:** Use the sender that already appears in the conversation thread. SuperSend restricts some provider threads to the mailbox that owns the thread.

- **Issue:** Test webhooks trigger AI or send test emails.  
  **Fix:** Skip flows when **`test`** is `true` in the webhook body.

- **Issue:** Automation runs on bounces or out-of-office mail.  
  **Fix:** Filter on **`type === "reply"`** and optionally disable **Bounce** / **Autoresponse** on the webhook integration. See [Webhooks: Replies, Bounces, and CRM Automation](https://help.supersend.io/en/article/webhooks-replies-bounces-and-crm-automation-glg697/).

- **Issue:** Duplicate replies (human and automation both send).  
  **Fix:** Add approval for all sends, or disable auto-send when a teammate may reply manually in Super Inbox. Consider branching only on high-confidence **`reply.category`** values.

- **Issue:** Need exact JSON field names or signing headers.  
  **Fix:** Use **Test →** and **View Payload** in webhook delivery logs, and the developer docs at [docs.supersend.io — Webhooks](https://docs.supersend.io/docs/webhooks).

## Related Articles

- [Webhooks: Replies, Bounces, and CRM Automation](https://help.supersend.io/en/article/webhooks-replies-bounces-and-crm-automation-glg697/)
- [Webhooks: Testing, Delivery Logs, and Payloads](https://help.supersend.io/en/article/webhooks-testing-delivery-logs-and-payloads-dbmbkb/)
- [Zapier and Make Setup](https://help.supersend.io/en/article/zapier-and-make-setup-1k96iky/)
- [Connect SuperSend MCP to Claude](https://help.supersend.io/en/article/connect-supersend-mcp-to-claude-186qdf7/)
- [Work Conversations in Super Inbox](https://help.supersend.io/en/article/work-conversations-in-super-inbox-154o06z/)
- [Replies and Sequence Behavior](https://help.supersend.io/en/article/replies-and-sequence-behavior-17r7aa9/)
