Skip to main content
Was this helpful?

Webhook Failures

PrimeCal automation rules can be triggered by incoming webhooks — an external service POSTs a JSON payload to a unique URL, and the automation runs. This page covers what to check when a webhook isn't triggering as expected.


Understanding the Webhook URL

Each automation rule with a webhook.incoming trigger gets its own unique URL:

POST https://app.primecal.eu/api/automation/webhooks/{token}/receive

The {token} is specific to that rule. You can find it in Automation → [Your Rule] → Webhook.


The Webhook Is Not Triggering

Step 1: Verify the URL is correct.

Copy the webhook URL from the rule's Webhook section in PrimeCal and confirm it matches what you're sending to. Tokens are long random strings — a single character difference means the webhook won't match any rule.

Step 2: Confirm the request is reaching PrimeCal.

Check whether your external service (Slack, Zapier, your own service, etc.) is actually making the HTTP request:

  • Look at your service's outgoing webhook logs
  • Confirm the request returns a 2xx status code from PrimeCal

A 404 means the token is wrong. A 400 means the payload format is incorrect. A 200 means PrimeCal received it.

Step 3: Check the automation rule's conditions.

Webhooks only trigger the rule if its conditions pass. If your automation has conditions like webhook.data.status equals "completed", the rule won't fire if the incoming payload has a different value.

Go to Automation → [Your Rule] → Audit Log to see whether the webhook was received and why it did or didn't fire.


The Audit Log Shows "Received but Conditions Not Met"

This is the most common case. The webhook arrived at PrimeCal successfully, but the rule's conditions didn't match the payload.

Check your condition values:

  • webhook.data.status accesses data.status inside the JSON body
  • The comparison is case-sensitive for equals operator
  • Use contains instead of equals if you want partial matches

Example payload:

POST /api/automation/webhooks/abc123.../receive
{
"event": "order.completed",
"data": {
"status": "completed",
"customer_id": "cust_456"
}
}

For this payload, the field path webhook.data.status would resolve to "completed".


The Webhook URL Returns 401 or 403

Webhook URLs are public and don't require authentication — they use the token itself as the authorization mechanism. If you're getting a 401 or 403:

  • Confirm you're not accidentally sending an Authorization header that conflicts
  • Confirm the webhook URL hasn't been regenerated — if the token was regenerated, the old URL is invalid

To regenerate a token (which also invalidates the old URL): go to the rule detail → Webhook tab → Regenerate Token. Update the URL in your external service after doing this.


The Webhook Returns 200 but Nothing Happens

If the audit log shows the webhook was received with conditions passing, but the action didn't execute:

  1. Check the action configuration — for set_event_color, an event must exist with matching calendar context
  2. Check whether the rule is enabled (not paused)
  3. Note the rate limit: automation rules have a 1-minute cooldown between executions to prevent runaway loops. If a second webhook fires within a minute of the first, it may be skipped

Testing a Webhook Manually

You can test your webhook using curl or any HTTP client:

curl -X POST https://app.primecal.eu/api/automation/webhooks/YOUR_TOKEN_HERE/receive \
-H "Content-Type: application/json" \
-d '{"event": "test", "data": {"status": "completed"}}'

Then check the automation rule's audit log to see whether it was received and processed.


Still Stuck?

  • Check the audit log first — it shows every webhook receipt and why it fired or didn't
  • For conditions and field paths: Webhook Smart Values
  • Contact support: Support Contact