Use Orbit Flows with Zapier
Start a Zap from anything that happens in your satellites, with a webhook or a flow step, check the signature with Code by Zapier and use the event's fields in your actions.
How-to guide3 min read
Zapier runs Zaps: a trigger, then actions in other apps. With Orbit Flows and webhooks, the trigger can be anything that happens in your satellites. For example, Northwilds sends every new Presence Orbit review to a Zap that posts it in a shared spreadsheet and alerts the shop manager.
You need an owner or admin role in your organisation, a paid satellite plan (see Who can use webhooks) and a Zapier plan that includes Webhooks by Zapier, which is one of Zapier's premium apps.
Choose how to send
- A webhook in Orbit, under Webhooks, sends every event you tick, signed. Use it when the Zap should decide what happens.
- Send to a webhook in a flow sends only when the flow's conditions are true, after an approval or an AI step if you add one. It is not signed.
Use Orbit Flows with Make compares the two in a table.
1Get an address from Zapier
- In Zapier, create a Zap and choose the trigger.
- Choose Webhooks by Zapier, then the event Catch Hook. To check signatures, choose Catch Raw Hook instead; see step 4.
- Choose Continue. Zapier shows an address like
https://hooks.zapier.com/hooks/catch/1840422/reviews/. Copy it.
2Send events to Zapier
With a webhook
- In Orbit, open Organisations, choose your organisation, then Webhooks, and choose Add webhook.
- Name it, such as Reviews to Zapier, and paste the Zapier address into Address.
- Tick the events, such as
presence.review.received, and choose Add webhook. - Copy the signing secret Orbit shows once.
- Choose ⋯ next to the webhook, then Send a test.
In Zapier, choose Test trigger. The test message from Orbit appears, and its fields can be used in your actions.
Or from a flow
- In Orbit, open Flows, open a flow and choose Add a step, then Send to a webhook.
- Paste the Zapier address and choose JSON for your own system.
- Write a message and choose Save flow. Choose Run now, or wait for the next event, to send a first message Zapier can test with.
3Use the fields
Zapier lists the fields of the message by name:
- From a webhook in Orbit: Event is the event's type, and the details are under Data, such as Data Rating, Data Location and Data Text for a review.
- From a flow step: the event is under Event Data, your message is Message, and an AI step's text is under Steps.
Every field each event has is in the event reference. Add a Filter by Zapier step to go on only for some events, such as a rating under 3.
4Check the signature
With Catch Raw Hook, Zapier passes on the body as text and the headers, so the signature can be checked:
- Add an action: Code by Zapier, Run JavaScript.
- Under Input Data, add
body(the raw body),timestamp(theX-Orbit-Timestampheader) andsignature(theX-Orbit-Signatureheader). - Paste this code, with your signing secret:
const crypto = require("crypto");const secret = "your signing secret";const expected = crypto.createHmac("sha256", secret).update(`${inputData.timestamp}.${inputData.body}`).digest("hex");const fresh = Math.abs(Date.now() - Number(inputData.timestamp)) < 5 * 60 * 1000;if (expected !== inputData.signature || !fresh) throw new Error("Not from Bifröst Orbit");return JSON.parse(inputData.body);The Zap stops at this step for anything not signed with your secret, and later steps use the fields it returns. Better still, keep the secret in Zapier's storage rather than in the code. Flow steps are not signed, so treat their address like a password.
5Publish the Zap
Choose Publish. Zapier answers straight away, so Orbit counts each message as delivered and tries again for up to 24 hours if Zapier can't be reached.
Was this page helpful?