Connect Zapier
Zapier links Cubrel to thousands of other apps. A Zap reacts to something in one app and does something in another. This page shows the two ways a Zap connects to Cubrel, two examples, and how to adapt them to your own case.
You need the Admin role in Cubrel. The REST API and webhooks are on every plan. In Zapier, the Webhooks by Zapier app may need a paid Zapier plan.
How Zapier talks to Cubrel
From Cubrel to Zapier
Cubrel tells Zapier the moment a record changes, through a webhook:
- In Zapier, start a Zap with the trigger Webhooks by Zapier, event Catch Hook. Copy the URL Zapier shows.
- In Cubrel, go to Workspace > Integrations > Webhooks > New Webhook. Pick the module, the events (Created, Updated, Deleted) and paste Zapier's URL. Save.
- Back in Zapier, click Test trigger, then change a record in Cubrel. Use Send test on the webhook's page if you don't want to touch real data. Zapier now shows the fields Cubrel sends.
- To react only to some changes, add a Filter by Zapier step. The
eventfield tells you what happened, likedeals.updated. For an update,changeslists every field that changed with its old (from) and new (to) value.
From Zapier to Cubrel
A Zap writes into Cubrel through the REST API:
- In Cubrel, create a token under Workspace > Integrations > API Tokens > New Token, with only what the Zap needs, such as Write on Leads. See API Tokens.
- In Zapier, add the action Webhooks by Zapier, event Custom Request:
- Method:
POSTto create a record. - URL: your workspace address plus
/api/v1/and the module, such ashttps://yourcompany.cubrel.com/api/v1/leads. - Data: the record as JSON, with the fields you map from the trigger.
- Headers:
Authorizationwith the valueBearerfollowed by your token, andContent-Typewithapplication/json.
- Method:
- Use the field names and values Cubrel expects. Download OpenAPI next to the token lists every field of the modules it can reach, with the allowed values of each select field; see Downloading the OpenAPI file.
Updating instead of adding twice
If the same person or product can come in again, don't create it twice. Use Method PUT and add ?match=email (or another field, like sku) to the URL: Cubrel updates the one record with that value, or creates it when there's none. See Create or update by a field.
Example: a form entry becomes a lead
Your website form or survey tool, such as Google Forms or Typeform, sends every entry to Sales as a lead.
| Step | Setting |
|---|---|
| Trigger | Your form app's "new entry" or "new response" event |
| Cubrel token | Write on Leads |
| Action | Webhooks by Zapier, Custom Request, PUT to /api/v1/leads?match=email |
| Data | first_name, last_name, email, company from the form; lead_source set to website |
Every new lead can now start a workflow, such as a welcome email and a call task; see Leads Arrive on Their Own.
Example: a won deal posts to Slack
The team channel hears about every won deal.
| Step | Setting |
|---|---|
| Cubrel webhook | Module Deals, event Updated, URL from Zapier's Catch Hook |
| Filter | Only continue if changes > sales_stage > to is exactly closed_won |
| Action | Slack, "Send channel message": Won: [deal name], [amount] |
The filter matters: without it, every later edit of the won deal would post again, because changes only lists the stage when the stage itself just changed.
Adapt it to your case
Every Zap with Cubrel is one of the two patterns above. To build your own, change three things:
| Change | Examples |
|---|---|
| The module | contacts, deals, quotes, cases, or any module of yours. The slug is in the module's address in Cubrel. |
| The filter (from Cubrel) | event is quotes.created; changes > status > to is accepted |
| The fields (to Cubrel) | Any writable field, custom fields included, listed in the token's OpenAPI file |
Any app Zapier supports can be the trigger on one side or the action on the other.
Keeping it safe
- Give each Zap its own token with only the modules and actions it needs. Revoke it when you stop using the Zap.
- Keep the Catch Hook URL private: anyone who has it could send fake events to your Zap. Zapier can't easily check Cubrel's signature without code; to check it, see Checking the signature.
- A webhook that keeps failing turns itself off after 10 failures in a row, and its creator is notified. Turn it back on from the webhook's page once Zapier works again.
In short
| Question | Answer |
|---|---|
| How does Zapier hear about changes? | A Cubrel webhook pointing at a Catch Hook URL |
| How does Zapier write into Cubrel? | Webhooks by Zapier, Custom Request, with an API token |
| How do I avoid duplicates? | PUT with ?match=email or another field |
| Where are the field names? | Download OpenAPI next to the token |
| How do I react to one kind of change only? | A Filter step on event or changes |