> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.agentduet.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.agentduet.com/_mcp/server.

# Make

This guide explains how to connect AgentDuet voice agents to [Make](https://www.make.com) to trigger visual scenarios, query business applications, and orchestrate customer workflows directly from telephone conversations.

---

## Why Connect Make to AgentDuet?

AgentDuet handles carrier telephony infrastructure, SIP management, call answering, and ultra-low-latency audio streaming (16 kHz or 24 kHz Linear PCM) over persistent WebSockets.

While your voice model manages natural conversation, business logic often requires access to external services: checking appointment calendars, querying inventory, updating CRM contacts, or sending confirmation emails.

Connecting your voice agent to Make provides:

* **Visual Low-Code Scenarios**: Design multi-step workflows, routing rules, and data mappings visually without building custom backend microservices.
* **1,000+ App Connectors**: Connect voice agents instantly to Google Sheets, Airtable, HubSpot, Salesforce, Stripe, Zendesk, Slack, and Microsoft 365.
* **Zero Infrastructure Overhead**: No webhook servers or cloud containers to manage; Make handles execution and scales with call volume.
* **Decoupled Architecture**: Keep telephony and voice processing separate from business integrations. Update CRM fields or notification logic in Make without redeploying voice code.

---

## Architecture

Real-time audio and scenario automation operate on two distinct, optimized communication channels:

```mermaid
flowchart TD
    Caller["Telephone Caller"] <-->|"PSTN / SIP Phone Line"| AgentDuet["AgentDuet Telephony Engine"]
    AgentDuet <-->|"Bidirectional WebSocket (wss://) • 16/24 kHz LPCM"| VoiceAgent["Voice Agent Runtime"]
    VoiceAgent -->|"HTTPS POST Webhook (Structured JSON)"| MakeWebhook["Make Custom Webhook & Scenario"]
    MakeWebhook --> Systems[("CRMs / Sheets / Email / Messaging")]
    MakeWebhook -->|"HTTPS JSON Response (Tool Results)"| VoiceAgent
```

| Communication Path | Transport | Purpose |
| :--- | :--- | :--- |
| **Caller $\leftrightarrow$ AgentDuet** | PSTN / SIP | Telephony carrier connection, call state, dial tones |
| **AgentDuet $\leftrightarrow$ Voice Agent** | WebSocket (`wss://`) | 16 kHz / 24 kHz Linear PCM audio streaming, sub-millisecond barge-in buffer flush |
| **Voice Agent $\leftrightarrow$ Make** | HTTPS POST | Structured JSON payloads for live tool execution, CRM lookups, and post-call sync |

---

## How to Trigger Make from Your Voice Agent

Your voice agent communicates with Make over standard HTTPS custom webhooks. Below is a minimal, reusable Python pattern for dispatching requests to Make from within an AgentDuet voice agent:

```python
import httpx
from typing import Any, Dict

class MakeScenarioClient:
    """Dispatches webhook events from an AgentDuet voice agent to Make."""

    def __init__(self, webhook_url: str):
        self.webhook_url = webhook_url
        self.headers = {"Content-Type": "application/json"}

    async def execute(self, payload: Dict[str, Any]) -> Dict[str, Any]:
        """Sends an event payload to a Make Custom Webhook and returns the response."""
        async with httpx.AsyncClient(timeout=5.0) as client:
            response = await client.post(
                self.webhook_url,
                json=payload,
                headers=self.headers,
            )
            response.raise_for_status()
            return response.json()
```

### Usage Patterns

1. **Mid-Call Tool Lookups**: When the caller requests live information (such as checking available appointment slots or order status), the voice model triggers a tool call that invokes `client.execute({"action": "check_availability", ...})`. The returned JSON is passed back to the voice model to speak to the caller in real time.
2. **Post-Call Multi-App Sync**: When the call completes, the agent extracts structured outcome details and fires an asynchronous webhook to Make to log the record into Google Sheets, update your CRM contact, and dispatch an email confirmation.

---

## Best Practices for Voice Scenarios

* **Keep Mid-Call Scenarios Fast**: Voice callers expect natural conversational turn-taking. Design mid-call Make scenarios to respond within 1 to 2 seconds. Avoid heavy computations or slow third-party API chains on the critical path.
* **Always Include a Webhook Response Module**: Ensure your scenario ends with a **Webhook Response** module set to HTTP status `200` with header `Content-Type: application/json` so the voice agent receives structured return data.
* **Separate Background Tasks**: If a scenario needs to send emails, generate PDF receipts, or notify team channels, return the JSON response to the voice agent first, and place downstream actions on parallel scenario routes.
* **Provide Conversational Fallbacks**: Always handle timeouts or empty results gracefully in your voice prompt so the agent can inform the caller politely if an external service is unavailable.

---

## Reference Implementation

A working reference sample is available in the [agentduet-samples](https://github.com/AgentDuet/agentduet-samples) repository:

* **Repository Directory**: [`agentduet-samples/integrations/make`](https://github.com/AgentDuet/agentduet-samples/tree/main/integrations/make)

To set up and run the voice agent locally:

```bash
# 1. Clone the repository
git clone https://github.com/AgentDuet/agentduet-samples.git

# 2. Navigate to the Make integration directory
cd agentduet-samples/integrations/make
```

Head over to [`README.md`](https://github.com/AgentDuet/agentduet-samples/blob/main/integrations/make/README.md) inside this folder for complete setup instructions, environment configuration, ready-to-import scenario blueprints, and everything you need to bring your voice agent live in minutes!

---

## Next Step

<Card title="Voice AI Agent for Appointment Booking" icon="fa-duotone fa-arrow-right" href="/use-cases/voice-ai-agent-for-appointment-booking">
  Explore complete end-to-end production recipes starting with telephone appointment booking and live tool execution.
</Card>