Connecting Zapier, Make or a CRM
An outside service such as Zapier, Make or your CRM can tell a Benecaster add-on that something happened, by posting to one address on your site. A CRM that has just added a guest can tell your guest add-on so, for example. Benecaster checks every call before the add-on sees it: who is calling, that the add-on is active on the show, and that the data is what the action expects.
This is the other half of Outbound Webhooks, which send events out of your site. Both live on Benecaster → Settings → Webhooks: the actions are under Incoming actions, below the outbound settings.
Before You Start
It uses WordPress Application Passwords. There is no Benecaster key or token to copy. The service signs in as a WordPress user, with a password WordPress generates for that user.
Some security plugins and hosts switch Application Passwords off automatically. The sign is that there is no Application Passwords section on Users → Profile. To turn them back on, look in your security plugin’s settings for one named Application Passwords or Disable application passwords, or ask your host. When WordPress reports them unavailable, Settings → Webhooks → Incoming actions shows a yellow warning saying so.
WordPress offers them only over HTTPS (or on a local development site). A site served over plain http:// has no Application Passwords section at all.
Each Application Password acts as its user, so use a dedicated Benecaster Integration user, never an administrator’s account. An administrator’s password pasted into Zapier can do anything that administrator can. A user with the Benecaster Integration role can run integration actions and nothing else: in the WordPress admin it sees only the Dashboard and its own profile, it cannot open any Benecaster screen, and every Benecaster admin route answers it with 403.
Setting It Up
- Go to Users → Add New (the Add a new user link under Incoming actions opens it). Create a user for the service, for example
zapier, and set Role to Benecaster Integration. Click Add New User. - Go to Users → All Users, open that user, and scroll to Application Passwords. Type a name for the service (for example Zapier) and click Add New Application Password. WordPress shows the password once: copy it.
- In the service, choose HTTP Basic authentication. The username is the user you created; the password is the Application Password (with or without its spaces).
- Have the service send a
POSTtohttps://yoursite.com/wp-json/benecaster/v1/actions. The exact address for your site is shown under Incoming actions.
Actions available, under Incoming actions, lists every action your add-ons accept, grouped by add-on, with the fields each one expects, for example guest_id (integer, required), note (string). If it reads No add-on you run offers an action yet., none of your active add-ons accepts calls.
To disconnect a service, delete its Application Password on that user’s profile, or delete the user.
The Request
POST /wp-json/benecaster/v1/actions
Authorization: Basic base64(username:application-password)
Content-Type: application/json
{
"action": "podcast-workflow.guest.crm_linked",
"show_id": 12,
"idempotency_key": "zap-8f2c41-guest-381",
"data": { "guest_id": 381, "crm_id": "0031x00000ABCDe" }
}
| Field | Description |
|---|---|
action |
Required. The action’s name, as listed under Actions available. |
show_id |
Required. The show the call is about. A draft show is accepted; a show in the trash is not. |
idempotency_key |
Optional. Any 1–191 printable ASCII characters that identify this one request, so a retry is not run twice. See Repeated Calls. |
data |
The action’s own fields, as a JSON object. Defaults to {}. |
Services such as Zapier and Make send most values as text, so text is accepted where it is unambiguous: "12" counts as the number 12 and "true" as true. A key in data that the action does not expect is ignored rather than refused.
A successful call answers 200:
{ "action": "podcast-workflow.guest.crm_linked", "show_id": 12, "call_id": 5521, "replayed": false, "result": { "guest_id": 381, "checklist_item": "crm" } }
result is whatever the add-on returned.
To see which actions the signed-in user can run right now, GET /wp-json/benecaster/v1/actions lists them, with their fields and the shows each can run on. Add ?show_id=12 to narrow it to one show.
When a Call Is Refused
The checks run in a fixed order, and a caller is never told whether an action exists before it has shown it may run actions.
| Status | Code | What it means |
|---|---|---|
429 |
benecaster_rate_limited |
Too many calls: the limit is 120 every 5 minutes for each calling user. Wait for the number of seconds in the Retry-After header. |
401 |
incorrect_password, invalid_username or invalid_email |
WordPress itself refused the username or Application Password. Check both, and check Application Passwords are switched on. |
401 |
benecaster_action_not_signed_in |
The call arrived with no sign-in at all. Check the service is set to HTTP Basic authentication. |
403 |
benecaster_action_forbidden |
The user is signed in but does not have the Benecaster Integration role (or is not an administrator). |
404 |
benecaster_action_unknown |
No add-on accepts an action by that name, or action is missing. Check the spelling against Actions available. |
400 |
benecaster_action_invalid_show |
show_id is missing, is not a show, or is a show in the trash. |
403 |
benecaster_action_inactive |
The action’s add-on is not running on that show: it is not on the show’s license, it is switched off for the show, or the license has lapsed. |
400 |
benecaster_action_invalid_data |
A required field is missing or a field has the wrong type. The response names every failing field, not just the first. data that is not a JSON object is refused the same way. |
400 |
benecaster_idempotency_key_invalid |
The idempotency key is empty, longer than 191 characters, or contains characters other than printable ASCII. |
409 |
benecaster_idempotency_key_reused |
The same idempotency key was used for a different request in the last 24 hours. Nothing ran. |
409 |
benecaster_idempotency_in_progress |
A call with the same key is still running. Retry after the Retry-After seconds. |
500 |
benecaster_action_failed |
The add-on failed while handling the call. The message is deliberately generic. |
The add-on itself can also refuse a call, with its own code and a 4xx status.
Repeated Calls
Zapier and Make retry a call when they do not hear back in time, so the same request can arrive twice. Send an idempotency_key to make that harmless.
- A repeat of the same request with the same key, within 24 hours, is not run again. It gets the first call’s answer, with
"replayed": trueand the headerX-Benecaster-Idempotent-Replay: true. - The same key with a different action, show or data is refused with
409 benecaster_idempotency_key_reused. - Keys are kept per calling user, so two services using the same key do not collide. After 24 hours a key is forgotten and can be used again.
- A call refused before the add-on ran, for bad data for example, does not use up its key: fix the request and send it again with the same key. A
500does not use it up either.
A call with no key is still accepted; it simply has no protection against being run twice.
Recent Calls
Incoming actions → Recent calls shows the last 50 calls, newest first: the action, the add-on, the show, Called by (the user the service signed in as), the Result (Done, Refused, Failed, or Repeat — first answer sent again) with its status and error code, and the time. Calls are kept for 30 days.
The data a service sent is never stored, so the log holds nothing about your listeners. A call that failed the sign-in or role check is not logged at all; one refused for any later reason is, because that is what you need to see when a Zap stops working.
Calls are not suppressed on a staging site: a staging copy receives only the calls someone points at it.
See Also
Need this built rather than just documented? See our services →