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

# Make

> The agent runs a Make scenario during the call and passes the scenario's answer on to the caller. Plus: post-call events and ad leads.

Make connects to BrosBots in three directions. This page covers the first,
which is its own integration in the catalogue, and points at the other two.

| Direction | What it does | Where |
| - | - | - |
| **Agent → Make during the call** | The agent runs the scenario with call data and **hears what it answers** | this page |
| **BrosBots → Make after an event** | A signed `POST` after a call, an SMS, a campaign, or on a low balance | [Webhooks](/en/integrations/webhooks) |
| **Make → BrosBots** | Make makes the agent call: a lead from Facebook, LinkedIn, TikTok, a sheet | [Make and Zapier templates](/en/integrations/leads/make-zapier), [API trigger](/en/voice-agent/api-trigger) |

## How it differs from Zapier

The Zapier trigger sends data and that is the end of it: a Catch Hook does
not answer. A Make scenario that ends with a **Webhook response** module
does, and whatever it answers reaches the agent as the tool's result. So the
agent can not only push something into your systems but **ask them
something** while the caller is still on the line: an order's status in the
shop, a free slot in the booking system, a customer record in an app Make
has a module for and we have no integration with.

A scenario without a Webhook response module works too: Make answers
`Accepted`, the agent gets "sent" and carries on.

## Connecting

<Steps>
  <Step title="The scenario in Make">
    New scenario → **Webhooks → Custom webhook** module → **Add**, give it a
    name. If the scenario should answer the agent, end it with a
    **Webhooks → Webhook response** module with a JSON body (example below).

    Recommended: in the webhook's **Show advanced settings** switch on
    **Get request headers**, and after the first module add a filter: the
    `x-brosbots-secret` header equal to your secret. You enter the same
    secret on our side.
  </Step>

  <Step title="Copy the address and switch the scenario on">
    The address is in the webhook module (**Copy address to clipboard**),
    of the form `https://hook.eu1.make.com/…`. The toggle in the bottom left
    of the editor has to be on; with a webhook trigger the schedule is
    **Immediately**.

    <Note>
      Make only learns the data structure from the first request. Click
      **Redetermine data structure**, save the connection on our side (saving
      delivers a test message) and only then map the fields in the modules
      that follow.
    </Note>
  </Step>

  <Step title="The connection in BrosBots">
    **Integrations** → **Make**. Paste the address and the secret, if you
    set one. Saving delivers a test message, so the scenario runs once with
    `"event": "test"` in the body.
  </Step>

  <Step title="Switch the tool on in the agent">
    Agent editor → **Integrations** → **Make scenario**. Pick the connection
    and fill in **When to use it, and what to say** and **Phrases that should
    trigger it**. Without those fields the agent has the tool but no idea
    what it is for - and usually leaves it alone. Details in [Slack, email,
    Zapier and the calendar during the
    call](/en/integrations/overview#slack-email-zapier-and-the-calendar-during-the-call).
  </Step>
</Steps>

The same toggle is in the new-agent wizard (**What your agent can do** →
**Make scenario**): the address and secret entered there create the
connection on save.

<Note>
  The Make integration is available from the **Start** plan, like Zapier, n8n
  and the webhooks. Make's Webhooks module is available on its free plan too.
</Note>

## What reaches the scenario

The agent sends a `POST` with JSON. It chooses `event` and `data` itself,
following what you wrote in **When to use it, and what to say**; the other
two fields are added by us, so the agent cannot invent them.

```json theme={null}
{
  "event": "appointment_request",
  "data": "Tuesday 10:00, haircut, customer Anna",
  "caller_phone": "+48600100200",
  "workflow_run_id": "3f1c2a7e-...."
}
```

| Field | Where it comes from |
| - | - |
| `event` | a short event name from the agent, e.g. `lead_qualified`, `order_status`, `appointment_request` |
| `data` | what the agent collected during the call, or what it is asking about - free text |
| `caller_phone` | the caller's number (empty on a widget call) |
| `workflow_run_id` | the call id; the same one that arrives later in `call.completed` |

In Make the fields are `{{1.event}}`, `{{1.data}}`, `{{1.caller_phone}}`.
With the `X-Brosbots-Secret` header when the connection has a secret.

## What the scenario can answer

The **Webhook response** module: **Status** `200`, under **Custom headers**
add `Content-Type: application/json`, and in **Body** one sentence the agent
should pass on:

```json theme={null}
{ "message": "Tuesday 10:00 is free, I have booked Anna for a haircut." }
```

Supported shapes:

| Response | What the agent gets |
| - | - |
| `{"message": "…"}` (also `result`, `answer`, `text`) | the text alone |
| plain text | the text as is |
| any other JSON | the JSON whole, up to 2000 characters - the agent reads it itself |
| `Accepted` (no Webhook response module) | "sent", with no result |

The agent waits for the answer for up to **15 seconds**. The call is live, so
if the scenario does something slow, put Webhook response early in the chain
and the heavy modules after it. Make runs them after the response is sent.

A `4xx`/`5xx` code is a tool error: the agent gets "Make failed (code)" and
tells the caller it could not check. Make also returns `400` when the filter
rejects a request without the secret.

## Post-call events in Make

That is a separate integration, **Post-call webhook** in the catalogue, and a
separate scenario: a **Custom webhook** module whose address you paste into
the webhook wizard. `call.completed` arrives with the transcript, summary and
outcome, and on request SMS, campaign and `balance.low` events too; the
format and the list of events are in [Webhooks](/en/integrations/webhooks).

## Troubleshooting

| Symptom | Cause | What to do |
| - | - | - |
| Test: Make returned `400` | the secret filter rejected the request, or the webhook is waiting for a data structure | enter the same secret on both sides; in Make click **Redetermine data structure** |
| Test: Make returned `410` / `404` | the webhook was deleted or the scenario is off | switch the scenario on, copy the address again |
| The agent says it could not check | the scenario errored or did not answer within 15 s | **History** in Make shows which module failed; move Webhook response ahead of the slow modules |
| The agent never uses the tool | **When to use it, and what to say** is empty | describe when to run the scenario and what to pass |
| The agent reads out raw JSON | the scenario answers with a whole record | answer with `{"message": "…"}` and a finished sentence |
| The agent's fields are empty in later modules | the data structure was determined before the first real request | **Redetermine data structure**, then save the connection on our side again |

Every run shows up in Make under **History**, with the body the agent sent.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.