On this page

Automations, Heartbeats, and Workflows

Three ways to make the system work without you.

Trigger Use for
Automations An event in the system "When X happens, do Y"
Heartbeats A schedule "Every day at 8am, do Y"
Workflows A multi-step sequence "Do A, then B, then C"

Automations

What an automation is

An event-driven rule. When something happens, an agent acts.

Examples:

  • When a document expires in 30 days → create a compliance obligation
  • When a VAT return is filed → email the client the workpaper
  • When a new client is created → send the onboarding pack

Creating an automation

  1. Go to Automations, click New Automation.
  2. Set the trigger:
  • Event — a system event, e.g. client.created, document.expiring, return.filed
  • Schedule — a cron expression
  • Manual — only when you run it
  1. Set the action: which agent runs, with what prompt.
  2. Choose conditions to filter:
  • Only for clients of a certain type
  • Only when the amount is above a threshold
  • Only in a specific jurisdiction
  1. Decide whether it needs approval.
  2. Save and enable.

Conditions matter

An automation without conditions fires on everything. "When a return is filed, email the client" sends an email for draft returns too. Add status = filed as a condition.

Testing

Click Test on an automation to run it against sample data without saving changes. Check the Activity log to see what it would have done.


Heartbeats

What a heartbeat is

A recurring agent execution on a schedule. An agent wakes up, does something, and goes back to sleep.

Examples:

  • Every weekday at 8am: check the inbox and draft replies
  • Every Monday: generate a compliance status summary
  • Every quarter: check which clients have VAT returns due

Creating a heartbeat

  1. Go to Heartbeats, click New Heartbeat.
  2. Set:
  • Agent — which agent runs
  • Schedule — a cron expression, or pick from common presets
  • Prompt — what the agent should do each time
  1. Save and enable.

Cron presets

Preset Expression Runs
Every hour 0 Top of each hour
Daily at 8am 0 8 * Every day
Weekdays at 8am 0 8 1-5 Monday to Friday
Weekly on Monday 0 8 1 Mondays
Monthly on the 1st 0 8 1 First of each month
Every 15 minutes /15 * Frequent

Times are in your organization's timezone (default Gulf Standard Time, UTC+4).

Writing a good heartbeat prompt

Heartbeats run unattended, so the prompt must be self-contained.

Weak: "Check the inbox." Strong: "Check the unified inbox for unread messages in the last 60 minutes. For each, classify the intent. If it is billing or support and you can answer from knowledge, draft a reply and submit it for approval. If it is a complaint or anything with a financial commitment, assign it to Priya and do not reply. Summarise what you handled at the end."

Budget

Each heartbeat execution costs money. Set the agent's daily budget so a misconfigured schedule cannot run up a bill. See Agents.


Workflows

What a workflow is

A multi-step sequence. Unlike an automation (one trigger, one action) or a heartbeat (one prompt), a workflow chains steps with data flowing between them.

Example — client onboarding:

  1. Create the client record
  2. Send the engagement letter
  3. Request KYC documents
  4. Create standard compliance obligations from a template
  5. Schedule a follow-up call

Creating a workflow

  1. Go to Workflows, click New Workflow.
  2. Add steps. Each step has:
  • Name
  • Action — what to do
  • Agent — which agent performs it
  • Input — what data it needs, referencing the previous step's output
  1. Order the steps.
  2. Set failure handling: stop on error or continue and log.
  3. Save and enable.

Failure handling

Decide this deliberately.

Setting Behaviour Use when
Stop on error The workflow halts at the failing step Later steps depend on earlier ones
Continue and log It carries on, recording the failure Steps are independent

Monitoring a run

Open Activity and filter by the workflow. You see each step, its status, and any errors. A failed workflow can be re-run from the failed step once you fix the cause.


Webhooks

Go to Webhooks to send data out to your own systems.

Creating a webhook

  1. Go to Webhooks, click New Webhook.
  2. Set:
  • Target URL — where to POST
  • Events — which events trigger it
  • Secret — for HMAC signing
  1. Save.

You receive a POST with a JSON body and an X-IVY-Signature header containing the HMAC-SHA256 of the payload. Verify it on your side.

Verifying the signature

import hmac, hashlib

def verify(payload: bytes, header: str, secret: str) -> bool:
    expected = hmac.new(
        secret.encode(), payload, hashlib.sha256
    ).hexdigest()
    # constant-time compare
    return hmac.compare_digest(expected, header)

Never compare signatures with == — that leaks timing information.

Inbound webhooks

IVY OS accepts inbound webhooks for:

Provider Endpoint
WooCommerce POST /api/v1/webhooks/woo
WhatsApp POST /api/v1/connect/whatsapp/webhook
Telegram POST /api/v1/connect/telegram/webhook
Microsoft Teams POST /api/v1/connect/teams-chat/webhook

All verify signatures before processing. WooCommerce uses a consumer secret-based HMAC; the messaging platforms use their own verification schemes.


Troubleshooting

Symptom Cause Fix
Automation never fires No matching events, or disabled Check the event log and the enabled toggle
Automation fires too often Missing conditions Add filters
Heartbeat does not run Schedule in the past, or agent inactive Check the schedule and the agent's status
Heartbeat stops mid-run Daily budget exhausted Raise the budget or reduce the frequency
Heartbeat uses wrong timezone Organization timezone differs Check the organization settings
Workflow step fails silently Continue-on-error with no review Check the Activity log
Webhook signature rejected Secret mismatch or body altered Confirm the raw body is used for verification
Webhook returns 401 Signature verification failed Check clock skew and the shared secret