Skip to content

Connect Make ​

Make links Cubrel to other apps in scenarios: a chain of modules that starts with a trigger and passes data from one module to the next. This page shows the two ways a scenario 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.

How Make talks to Cubrel ​

From Cubrel to Make ​

Cubrel tells Make the moment a record changes, through a webhook:

  1. In Make, start a scenario with the Webhooks module Custom webhook. Add a webhook, name it, and copy its address.
  2. In Cubrel, go to Workspace > Integrations > Webhooks > New Webhook. Pick the module and events and paste Make's address. Save.
  3. In Make, click Run once, then change a record in Cubrel, or use Send test on the webhook's page. Make learns the shape of Cubrel's data from this first event.
  4. To react only to some changes, set a filter on the link after the webhook module. event tells you what happened, like quotes.updated. For an update, changes lists every changed field with its from and to value.

A webhook on Quotes that sends only updates to a Make address

From Make to Cubrel ​

A scenario writes into Cubrel through the REST API:

  1. In Cubrel, create a token under Workspace > Integrations > API Tokens > New Token, with only what the scenario needs. See API Tokens.
  2. In Make, add the HTTP module Make a request:
    • URL: your workspace address plus /api/v1/ and the module, such as https://yourcompany.cubrel.com/api/v1/contacts.
    • Method: POST to create a record.
    • Headers: Authorization with the value Bearer followed by your token.
    • Body: JSON, with the record's fields mapped from earlier modules.
  3. Use the field names and values Cubrel expects. Download OpenAPI next to the token lists them; see Downloading the OpenAPI file.

Updating instead of adding twice ​

If the same contact or product can come in again, 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.

Lists, such as order lines ​

Make is good at lists. When one trigger brings several items, like the lines of an order, an Iterator splits them and an Array aggregator collects them back into one list. That list becomes line_items in a single request to Cubrel; see Line items.

Example: a sheet row becomes a contact ​

A team keeps a contact list in Google Sheets. Every new row lands in Cubrel, and a row that comes again updates the same contact.

StepSetting
TriggerGoogle Sheets, Watch New Rows
Cubrel tokenWrite on Contacts
ActionHTTP, Make a request, PUT to /api/v1/contacts?match=email
Bodyfirst_name, last_name, email, phone from the row's columns

Example: an accepted quote fills a sheet ​

Finance keeps a sheet of accepted quotes to plan invoicing.

StepSetting
Cubrel webhookModule Quotes, event Updated, URL from Make's Custom webhook
Filterchanges > status > to equals accepted
ActionGoogle Sheets, Add a Row: quote number, name, total, accepted date

The webhook's data is the quote with its line_items, so the sheet can also list what was sold.

Adapt it to your case ​

Every scenario with Cubrel is one of the two patterns above. To build your own, change three things:

ChangeExamples
The moduleleads, deals, cases, projects, or any module of yours. The slug is in the module's address in Cubrel.
The filter (from Cubrel)event equals deals.created; changes > sales_stage > to equals closed_won
The fields (to Cubrel)Any writable field, custom fields included, listed in the token's OpenAPI file

Keeping it safe ​

  • Give each scenario its own token with only the modules and actions it needs.
  • Keep the Custom webhook's address private: anyone who has it could send fake events. Make can't easily check Cubrel's signature; 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 once the scenario runs again.

In short ​

QuestionAnswer
How does Make hear about changes?A Cubrel webhook pointing at a Custom webhook address
How does Make write into Cubrel?The HTTP module Make a request, with an API token
How do I avoid duplicates?PUT with ?match=email or another field
How do I send several line items?Iterator and Array aggregator, then one request with line_items
Where are the field names?Download OpenAPI next to the token