Make and Zapier
Guide to integrate Sarah with Make (Integromat) and Zapier to automate processes
Last updated: 2025-01-26
Sarah integrates seamlessly with automation platforms like Make (formerly Integromat) and Zapier to connect your management system with thousands of applications.
Initial Configuration
1. Get Integration Key
- Log in to Sarah
- Go to Settings > Integrations
- Copy your Integration Key
- Save it securely (don't share it publicly)
2. Configure Webhook in Make/Zapier
For Make (Integromat)
- Create a new scenario
- Add a Webhooks > Custom webhook module
- Configure:
- Method: POST
- URL:
https://sarah.ar/api/integration/in - Headers:
Authorization: Bearer <your-integration-key> Content-Type: application/json
For Zapier
- Create a new Zap
- Choose Webhooks by Zapier as trigger or action
- Configure:
- URL:
https://sarah.ar/api/integration/in - Method: POST
- Headers:
Authorization: Bearer <your-integration-key> Content-Type: application/json
- URL:
Send Events to Sarah (Inbound)
You can send events from Make/Zapier to Sarah to create or update data.
Example: Update Product Stock
Request structure:
json{
"event": "product.upserted",
"data": {
"product": {
"id": 123,
"sku": "ABC-001",
"name": "Updated Product",
"stock": 50,
"base_price": 1500.00
}
}
}
Required headers:
httpAuthorization: Bearer <your-integration-key>
Content-Type: application/json
x-idempotency-key: product.upserted:123
x-sent-at: 2025-01-26T12:34:56.789Z
Example in Make
- Trigger: Choose the event that will trigger the webhook (e.g., new order in Shopify)
- Action: Add HTTP > Make a Request module
- Configuration:
- URL:
https://sarah.ar/api/integration/in - Method: POST
- Headers:
json
{ "Authorization": "Bearer {{your-integration-key}}", "Content-Type": "application/json", "x-idempotency-key": "product.upserted:{{product.id}}", "x-sent-at": "{{now}}" } - Body:
json
{ "event": "product.upserted", "data": { "product": { "id": "{{product.id}}", "sku": "{{product.sku}}", "name": "{{product.name}}", "stock": "{{product.stock}}", "base_price": "{{product.price}}" } } }
- URL:
Example in Zapier
- Trigger: Choose your trigger (e.g., new record in Google Sheets)
- Action: Webhooks by Zapier > POST
- Configuration:
- URL:
https://sarah.ar/api/integration/in - Method: POST
- Headers:
Authorization: Bearer <your-integration-key> Content-Type: application/json - Data: Map trigger fields to Sarah format
- URL:
Receive Events from Sarah (Outbound)
To receive events from Sarah in Make/Zapier, you need to configure a webhook that Sarah can call.
Configuration in Make
- Create a scenario
- Add Webhooks > Custom webhook module
- Copy the generated Webhook URL
- Configure this URL in Sarah (requires environment variable configuration)
Configuration in Zapier
- Create a new Zap
- Choose Webhooks by Zapier > Catch Hook as trigger
- Copy the generated Webhook URL
- Configure this URL in Sarah
Available Events
Sarah can send the following events:
sales.created- New sale createdsales.paid- Sale paidsales.cancelled- Sale canceledinvoice.issued- Fiscal receipt issuedmovement.created- Inventory movementproduct.upserted- Product created/updatedproduct.stock_updated- Stock updated
Example: Notify in Slack when a sale is created
In Make:
- Trigger: Custom webhook (receives events from Sarah)
- Filter: Only process if
event = "sales.created" - Action: Slack > Create a Message
- Configuration:
json
{ "channel": "#sales", "text": "New sale: {{data.sale.total}} - Customer: {{data.sale.customer_id}}" }
In Zapier:
- Trigger: Webhooks by Zapier > Catch Hook
- Filter: Only if
eventequalssales.created - Action: Slack > Send Channel Message
- Map
data.salefields to Slack message
Common Use Cases
1. Sync Products from Shopify
Flow:
- New product in Shopify → Make/Zapier
- Make/Zapier → Sarah (
product.upserted) - Product available in Sarah
2. Update Inventory in Google Sheets
Flow:
- Sarah → Make/Zapier (
product.stock_updated) - Make/Zapier → Google Sheets (update row)
3. Send Email when Invoice is Issued
Flow:
- Sarah → Make/Zapier (
invoice.issued) - Make/Zapier → Email (Gmail, SendGrid, etc.)
- Customer receives invoice by email
4. Create Order in Sarah from WooCommerce
Flow:
- New order in WooCommerce → Make/Zapier
- Make/Zapier → Sarah (
sales.created) - Order created in Sarah
5. Notify in Discord when Stock is Low
Flow:
- Sarah → Make/Zapier (
product.stock_updated) - Make/Zapier → Filter (if
current_stock < 10) - Make/Zapier → Discord (send message)
Security
HMAC Signature (Recommended)
For greater security, you can configure HMAC signatures:
- In Sarah: Configure
MAKER_WH_HMAC_SECRET(environment variable) - In Make/Zapier: Validate
x-signatureheader
Validation example in Make:
- Add Tools > Set variable module to capture
x-signature - Calculate HMAC SHA-256 of raw body
- Compare with received header
- If they don't match, reject request
Replay Protection
Sarah includes x-sent-at header with ISO timestamp. Validate that event is not older than 5 minutes:
javascriptconst sentAt = new Date(request.headers['x-sent-at']);
const ageMs = Date.now() - sentAt.getTime();
if (Math.abs(ageMs) > 5 * 60 * 1000) {
// Reject event
}
Idempotency
Use x-idempotency-key header to avoid processing the same event multiple times:
- Store processed keys
- If you receive a duplicate key, ignore the event
- Clean old keys periodically
Troubleshooting
Error: "Missing bearer"
- Verify
Authorizationheader is configured correctly - Ensure you include
Bearerbefore the key
Error: "Invalid integration key"
- Verify Integration Key is correct
- Regenerate key from Settings > Integrations if necessary
Events don't arrive at Make/Zapier
- Verify
MAKER_WH_URLis configured in Sarah - Verify webhook URL is publicly accessible
- Review Sarah logs for sending errors
Duplicate events
- Implement idempotency using
x-idempotency-key - Store processed keys and verify before processing
Additional Resources
- Webhooks Inbound Documentation
- Webhooks Outbound Documentation
- Event Reference
- Authentication and Security
Support
If you need help with integration:
- Review Make/Zapier logs for errors
- Verify header and body configuration
- Contact Sarah support with error details