Keep Other Systems in Sync
Chapter 8 of the walkthroughs. Connect the other tools your business runs on: Cubrel tells them about changes through webhooks, and they put data into Cubrel through the REST API. This chapter sends accepted quotes to an accounting tool, and lets customers ask for help from inside your own app.
The REST API and webhooks are available on every plan. You need the Admin role.
At Tevatek
Invoices are written in the accounting tool, and customers use Tevatek Planner every day.
Two directions
| Direction | Use | Example |
|---|---|---|
| Into Cubrel | REST API: the other system reads or writes records | A website creates leads (chapter 5), an app opens tickets |
| Out of Cubrel | Webhooks: Cubrel tells the other system the moment a record changes | Accepted quotes go to accounting, ticket answers go to an app |
Part 1: send accepted quotes to accounting
1. Create the webhook
Under Workspace > Integrations > Webhooks > New Webhook:
- Name: after the system it feeds.
- Module: Quotes.
- Event: Updated.
- URL: the address your accounting tool's connector gives you, such as an n8n webhook URL. It must start with
https://. - Save, and copy the signing secret into the receiver.
At Tevatek
Accepted quotes to accounting, to an n8n flow that writes the invoice.
2. React only to accepted quotes
Cubrel sends every change to a quote. Let the receiver look at changes and only act when the status just became Accepted:
{
"event": "quotes.updated",
"data": { "id": "…", "quote_number": "QUO-2026-0458", "status": "accepted", "…": "…" },
"changes": { "status": { "from": "sent", "to": "accepted" } }
}data is the quote's fields as GET /api/v1/quotes/{id} returns them, line items included, so one parser works for the API and the webhook.
The same change can start a workflow, such as the one from chapter 6. Workflows and webhooks don't wait for each other.
3. Check the signature
Anyone who knows the URL could send fake requests. Let the receiver check the X-Cubrel-Signature header with the signing secret before it trusts a request, and reject old timestamps. See Checking the signature.
Part 2: help from inside your app
1. Create a token for the app
Under Workspace > Integrations > API Tokens > New Token, give the app Read and Write on your ticket module only. Tickets opened through the API are assigned like those from email; without auto-assignment they go to the token's user.
At Tevatek
Planner in-app help, acting as Jonas Pfeiffer.
2. Open tickets from the app
When a customer clicks Help in your app, the app's backend sends:
POST /api/v1/tickets/cases
Authorization: Bearer <token>
Content-Type: application/json
{
"requester_email": "s.koch@halder-logistik.example",
"requester_name": "Svenja Koch",
"subject": "Overtime report per warehouse",
"body": "Can the monthly overtime report be split by warehouse?"
}Use the module's slug, which stays the same after a rename. The ticket is assigned, timed and confirmed exactly like one from email, and the workflows from chapter 7 run on it.
3. Show answers in the app
Create a second webhook on your ticket module with the event New ticket message. Every answer from your team, and every automatic email, is sent to the app, so the customer can read the conversation there. They still get the answer by email too. Internal notes are never sent.
See Support Ticket Setup.
Test it
Send test on a webhook's page sends a test event with the newest record and shows the receiver's response code. Every delivery is listed on the webhook's page; a failed one can be sent again with Resend. If the receiver stays down, Cubrel retries over two hours, and after 10 failures in a row turns the webhook off and tells its creator.
Keeping it safe
- One token and one webhook per system, named after it, so one can be revoked without breaking the others.
- Tokens get only the modules and actions they need.
- Revoke a token the moment it may have leaked. A webhook's Regenerate secret does the same for its secret.
- Changes through the API show in the Audit Trail under the token's user.
What runs by itself now
| Step | Done by |
|---|---|
| Accepted quote reaches accounting | Webhook on Quotes, Updated |
| Customer asks for help from inside your app | REST API, ticket endpoint |
| The answer shows up in the app | Webhook, New ticket message |
Next: Keep an Eye on It.
In short
| Question | Answer |
|---|---|
| How does another system put data into Cubrel? | Through the REST API with a token |
| How does Cubrel tell another system about a change? | With a webhook to its URL |
| How do I react only to accepted quotes? | Check changes.status.to in the webhook body |
| Can another app open support tickets? | Yes, POST /api/v1/tickets/{module} |
| How does the app learn about answers? | The New ticket message webhook event |
| How does the receiver know a request is genuine? | It checks the X-Cubrel-Signature header |