# Zapier, n8n and Make

> Start a Zap, workflow or scenario the moment a draft is ready or a creator says yes, and run campaigns from the tools you already use. All three are built on the [REST API](https://yapfactory.com/developers/api.md) and [webhooks](https://yapfactory.com/developers/webhooks.md).

## Where to get it

| Tool | Status | What to do now |
| --- | --- | --- |
| Zapier | Built. The Zapier listing is pending. | Use Zapier's **Webhooks by Zapier** with [the subscription API](#any-tool) until the app is listed. |
| n8n | Built as `n8n-nodes-yapfactory`. Not on npm yet. | Use n8n's **Webhook** and **HTTP Request** nodes with [the subscription API](#any-tool) until the package is published. |
| Make | Built as a custom app. Not on Make yet. | Use Make's **Webhooks** and **HTTP** modules with [the subscription API](#any-tool) until the app is listed. |

This page will say when each one is live. The [changelog](https://yapfactory.com/developers/changelog.md) will too.

## Connect your account

All three sign in with an API key. In Yap Factory, open **Settings → AI agents → Make an API key** and paste it into the tool. Choose a key that can act: triggers subscribe a webhook, and actions change things. Each tool checks the key with [`GET /me`](https://yapfactory.com/developers/api/get_account.md).

A brand key gets the brand triggers and actions, a creator key the creator ones.

## Triggers

Each trigger is a webhook event. Turning a Zap, workflow or scenario on subscribes its URL to the events it uses; turning it off deletes the subscription. Events arrive within seconds.

| Event | Sent to | When |
| --- | --- | --- |
| `deal.updated` | Both sides | Every deal status change (`status`, `previousStatus`) |
| `deal.invited` | Creator | A brand invited you |
| `invite.accepted` | Brand | A creator said yes |
| `invite.declined` | Brand | A creator said no |
| `invite.expired` | Both sides | An invite ran out |
| `deal.started` | Both sides | The brand started the deal and payment is secured |
| `draft.submitted` | Brand | A draft or a new version is ready to review |
| `revision.requested` | Creator | The brand sent the draft back |
| `draft.approved` | Both sides | Approved, or approved automatically when the review window ran out |
| `deal.completed` | Both sides | The deal is done |
| `deal.cancelled` | Both sides | The deal was cancelled |
| `ask.received` | Brand | A creator asked to join a campaign |
| `message.received` | The other side | A new message on a deal |
| `campaign.published` | Brand | A campaign went live |
| `post.published` | Brand | A scheduled post went live (`data.postId`, `data.postUrl`) |
| `post.failed` | Brand | A scheduled post stopped and needs the person (`data.postId`, `data.reason`) |

An event carries ids and the page's link, never the words of a message or a creator's contact details. Add a **Get a deal** step after the trigger for the offer, the latest draft and recent messages. What each event's `data` holds is on [Webhooks](https://yapfactory.com/developers/webhooks.md#payload).

Two polling triggers need no webhook: new campaigns and new deals, checked every few minutes.

## Actions and searches

| For | Actions |
| --- | --- |
| Brands | Create a campaign draft, publish it, pause, resume or close it, get a campaign, invite creators, ask for changes to a draft, pass on a creator, schedule a post to your own TikTok or Instagram |
| Both sides | Send a deal message, get a deal |
| Creators | Browse live campaigns, ask to join one, answer an invite |
| Searches | Find creators (ranked for a campaign when you pick one), find a campaign, find or list deals |

Actions that tell other people say so: publishing, pausing or closing a campaign, invites, passing on a creator, asking for changes, messages, asks and answers. The other side is told straight away, the same as on the site.

> No action moves money. Starting a deal (the brand's card is charged), approving a draft (the creator is paid), a paid extra revision round, cancelling and disputes happen on yapfactory.com. Every deal has its page link in `url`.

Amounts come as `{ minor, currency, formatted }`. `minor` is pence or cents: `2500` with `USD` is $25.00. Use `formatted` to show it.

## Zapier

- **Instant triggers:** one per event above, such as Draft Ready to Review, Creator Said Yes and Deal Status Changed.
- **Polling triggers:** New Campaign and New Deal.
- **Actions:** Create Campaign Draft, Publish Campaign, Pause, Resume or Close Campaign, Invite Creators, Request Changes to a Draft, Pass on a Creator, Schedule Post, Send Deal Message, Answer an Invite, Ask to Join a Campaign.
- **Searches:** Find Creator, Find Campaign, Find Deal.
- While you build a Zap, the test step shows your latest real event of that type, or a sample when there isn't one yet.
- Zapier checks the `Yap-Signature` on every delivery and drops any that fail.

> The Zapier listing is pending. Until it's live, use Webhooks by Zapier: subscribe its Catch Hook URL with [the subscription API](#any-tool).

## n8n

Two nodes in the community package `n8n-nodes-yapfactory`, for n8n Cloud and self-hosted n8n.

- **Yap Factory Trigger:** pick any of the events, or Any Event. The workflow gets the event as we send it: `id`, `type`, `createdAt`, `livemode` and `data`. Deliveries without a valid `Yap-Signature` get a `401` and don't start the workflow.
- **Yap Factory:** Account, Campaign, Creator, Deal, Marketplace and Post, with the actions above plus getting and cancelling scheduled posts. Dropdowns list your campaigns, deals, creators, products, accounts and videos. It also works as a tool for n8n's AI Agent.
- Once published: **Settings → Community nodes → Install**, then `n8n-nodes-yapfactory`. Add a **Yap Factory API** credential with your key.

> `n8n-nodes-yapfactory` isn't on npm yet. Until it is, use the Webhook node, and subscribe its production URL with [the subscription API](#any-tool) from an HTTP Request node.

## Make

- **Watch Events** (instant): pick the events. Make subscribes the scenario's webhook when you create it and deletes the subscription when you delete the webhook.
- **Watch Deals** (polling): deals that are new or changed since the last run.
- **Actions:** Create a Campaign Draft, Publish a Campaign, Pause, Resume or Close a Campaign, Invite Creators, Ask for Changes to a Draft, Pass on a Creator, Schedule a Post, Send a Deal Message, Get a Deal, Get a Campaign, Answer an Invite, Ask to Join a Campaign.
- **Searches:** Search Creators, List Campaigns, List Deals, Browse Live Campaigns.
- Make can't read a delivery's raw body, so Watch Events doesn't check `Yap-Signature`. Its webhook address is long and random, and events carry only ids: the details need your key.

> The Make app isn't listed yet. Until it is, use a Custom webhook module, and subscribe its address with [the subscription API](#any-tool) from an HTTP module.

## Any other tool: the subscription API

Pipedream, Activepieces, your own server: anything that can receive a `POST` can subscribe. These follow the REST Hooks pattern the tools above use.

- `POST /webhooks`: [Add a webhook endpoint](https://yapfactory.com/developers/api/create_webhook.md) (Subscribe)
- `GET /webhooks`: [List webhook endpoints](https://yapfactory.com/developers/api/list_webhooks.md)
- `GET /webhooks/{webhookId}`: [Get a webhook endpoint](https://yapfactory.com/developers/api/get_webhook.md)
- `DELETE /webhooks/{webhookId}`: [Delete a webhook endpoint](https://yapfactory.com/developers/api/delete_webhook.md) (Unsubscribe)
- `GET /events`: [List recent events](https://yapfactory.com/developers/api/list_events.md) (Test data)

Subscribe:

```bash
curl https://yapfactory.com/api/v1/webhooks \
  -H "Authorization: Bearer $YAPFACTORY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://hooks.example.com/yap",
    "events": ["draft.submitted", "invite.accepted"],
    "description": "Drafts to Slack"
  }'
```

201 Created:

```json
{
  "data": {
    "id": "5b0d6c2e-1f3a-4e8b-9c7d-2a1b0c9d8e7f",
    "url": "https://hooks.example.com/yap",
    "description": "Drafts to Slack",
    "events": [
      "draft.submitted",
      "invite.accepted"
    ],
    "enabled": true,
    "secret": "whsec_…",
    "manage": "https://yapfactory.com/brand/settings#webhooks"
  }
}
```

- `secret` is shown once, in this answer only. Keep it to [check the signature](https://yapfactory.com/developers/webhooks.md#verify) of each delivery. A replay of the same `Idempotency-Key` returns `secret: null`.
- `events` takes any of the types above, or `["*"]` for all of them.
- The URL must be public `https`; addresses on private networks are refused. Up to 25 subscriptions per account, counting the ones made in Settings.
- Answer a delivery with `410 Gone` and we turn that subscription off at once, with no retries and no email. Other failures are retried for about 21 hours, as on [Webhooks](https://yapfactory.com/developers/webhooks.md#retries).
- `GET /events?type=draft.submitted&sample=true` returns your latest events of that type, or a sample with `livemode: false` when there are none. Tools use it for test data.
- Subscriptions need the `webhooks:write` scope (or `write`), and reading them `webhooks:read` (or `read`). They're REST only: the MCP server doesn't offer them.

## Help

Something not working, or want a trigger or action that isn't here? Email [support@yapfactory.com](mailto:support@yapfactory.com).

---

HTML version: https://yapfactory.com/developers/automation
