A timed workflow runs automatically on a schedule defined using a cron expression.
minute (0-59)
| hour (0-23)
| | day of month (1-31)
| | | month (1-12)
| | | | day of week (0-6, Sunday=0)
* * * * *
| Expression | Runs |
|---|---|
0 6 * * * |
Every day at 6:00am |
0 9 * * 1 |
Every Monday at 9:00am |
0 * * * * |
Every hour |
*/15 * * * * |
Every 15 minutes |
0 0 1 * * |
First day of every month at midnight |
30 8 * * 1-5 |
Weekdays at 8:30am |
An event workflow fires automatically when a record in a chosen entity is created, updated, or deleted.
When creating the workflow, choose:
orders, users, articles)EntityCreated — a new record was addedEntityUpdated — an existing record was changedEntityDeleted — a record was removedThe full record that caused the trigger is available in every step:
{{ $anythink.trigger.data.id }}
{{ $anythink.trigger.data.email }}
{{ $anythink.trigger.data.status }}
For EntityUpdated, the trigger data contains the record's current values after the update.
Event workflows fire on every change to the entity. To act only in certain cases, add a Condition step right after the trigger.
For example, to only send a notification when status becomes approved:
var status = $anythink.trigger.data.status;
return { is_approved: status === "approved" ? "yes" : "no" };
$anythink.steps.check.data[0].is_approved equals yesA manual workflow has no automatic trigger. It runs only when explicitly started.
From the dashboard: Open the workflow and click Run Now.
From the CLI:
anythink workflows trigger 76
anythink workflows trigger 76 --payload '{"userId": 123, "action": "reset-password"}'
Via the API:
POST /org/{orgId}/workflows/{workflowId}/trigger
Any JSON payload passed when triggering is available as trigger data:
{{ $anythink.trigger.data.userId }}
{{ $anythink.trigger.data.action }}
An API trigger turns your workflow into a custom HTTP endpoint. When an HTTP request arrives at that URL, the workflow runs.
Select API as the trigger type and enter a custom route, for example: /send-welcome-email
Anythink creates a POST endpoint at:
POST https://your-instance.anythink.cloud/org/{orgId}/workflows/endpoint/send-welcome-email
Any JSON body sent in the request is available as trigger data:
{{ $anythink.trigger.data.email }}
{{ $anythink.trigger.data.userId }}
curl -X POST \
https://your-instance.anythink.cloud/org/{orgId}/workflows/endpoint/send-welcome-email \
-H "Content-Type: application/json" \
-d '{"email": "alice@example.com", "name": "Alice"}'