Skip to main content
Human guide: task steps and agent prompt → Use a webhook when another system starts the work. Use a schedule when time starts it. Declare either binding in the Play source. Publishing activates it; checking or manually running the local file does not.

Before you start

Have a custom Play with reviewed input and acceptance rules. Choose the intended workspace, maximum work per invocation, and failure owner. Confirm credentials and any downstream write permissions before activation. For a webhook, identify the sender’s signature format and stable delivery ID. For a schedule, choose its timezone, intended times, and input. SQL listeners for retained provider feeds are covered by Set up a Monitor.

Inbound webhook contract

The JSON request body becomes the Play input. Keep the input small and explicit:
Save this as inbound-lead.play.ts. It verifies a Standard Webhooks v1 signature before the Play function runs:
Set the signing secret through the hidden CLI prompt. Keep its value out of commands, source files, and agent prompts:
HubSpot v3 signatures are not Standard Webhooks signatures. Put an authenticated relay in front of a HubSpot-bound Play: verify the HubSpot signature there, then sign the forwarded body with webhook-id, webhook-timestamp, and webhook-signature under Standard Webhooks v1. Use headerFamily: 'svix' for senders with svix-* headers. This example uses webhook-* headers. Configure the matching secret on the sender or relay. Use webhook: {} only in an isolated test environment. Require signature verification before production whenever the sender supports it.

Webhook delivery identity

Deepline deduplicates a retry only when the sender supplies a stable delivery identity. Header precedence is:
  1. x-deepline-dedupe-key
  2. idempotency-key
  3. x-github-delivery
  4. x-shopify-webhook-id
  5. webhook-id
  6. svix-id
Reuse the same nonblank value only for a retry of the same delivery. Give each new delivery a different value. Without one, every POST begins a new run. Deepline does not infer identity from identical JSON or a generic top-level id.

Cron schedule

Save this as daily-account-review.play.ts. Use a five-field cron expression and an IANA timezone. This minimal handler requires no input:
This example returns a timestamp; add your account selection and review logic to the function. Use a dataset when that logic processes rows. A schedule receives {} unless cron.input supplies a static JSON object. Set that object when the handler requires input. A previous manual run’s input does not become the schedule’s input.

Activate and test deliberately

First check and manually run the local file. These commands use the schedule example, which requires no input:
For the webhook example, use inbound-lead.play.ts and the sample JSON body shown above. Inspect the result and any downstream effects before publication. A file run tests the handler; it does not test sender authentication or delivery. Provider-backed handlers can spend Deepline credits. After the sample passes review, publish the selected file. Inspect its live binding:
For the webhook example, publish inbound-lead.play.ts and inspect inbound-lead. Copy the issued webhook URL from that trigger response into the sender or relay. Verify the active binding:
  • For a schedule, confirm the timezone, input, and next intended occurrence. Observe an actual scheduled run.
  • For a webhook, send one authenticated test from the configured sender. Confirm the handler receives the expected input.
  • Retry that delivery with its original ID. Confirm it reuses the same run. Use a different ID for a new event.
  • Check failure visibility with deepline notifications list and deepline notifications events. Configure and test the owner’s chosen destination before relying on unattended work. deepline notifications --help describes those steps.
Use deepline plays trigger --help to change or remove a published binding. For Git-deployed Plays, change the source repository. Removing a webhook retires its URL; re-enabling it issues a new URL.

Verify this task

Inspect the live binding and an observed event or scheduled occurrence. Handler tests, signature checks, and repeated-delivery checks establish different facts.