Automation in your backend
Run backend logic without a server: workflows that start on data changes, schedules and webhooks, then send email and push or call Slack and other services.
Last updated
Most backends end up with the same pile of glue code: when a record is created, tell someone, when an order is paid, send a receipt, every night, tidy up, when a partner calls, import what they sent. In Anythink that glue is a workflow. You describe when it starts and what it does, and your project runs it. There's no server for you to host, queue to operate or cron job to keep alive.
This page builds a small support desk end to end. A tickets entity drives four automations: an urgent ticket alerts the team, a resolved ticket emails the requester, a nightly job clears old records, and an external form posts new tickets in over HTTP. Each step shows the Anythink dashboard, the CLI and an AI assistant (MCP), and links to the guide that covers it in full.
If you haven't used Anythink before, read Core concepts first. To build a workflow from nothing, start with Build your first workflow.
Who it's for and what you'll build#
This is for a team that wants business logic to live next to its data: back-office rules, notifications, scheduled jobs and hand-offs to other systems, without writing and hosting a worker.
| You want to | Use | Guide |
|---|---|---|
| React when a record is created or changes | An Event trigger, with a filter so it only fires when it should | Triggers and scheduling |
| Run something every night or every hour | A Timed trigger with a cron expression | Triggers and scheduling |
| Let another system start your logic | An API Call trigger with its own route | Webhooks |
| Email a customer or your team | The Send An Email step and an email template | Send email from a workflow |
| Notify a phone or browser | The Send a Push Notification step | Push notifications from a workflow |
| Post to Slack, add a calendar event or call an AI model | The Integration step | How integrations work |
| Call any other HTTP service | The Call An API step | Webhooks |
Every automation has the same shape: one or more triggers, then a chain of steps. Each run is a job, and the job history records what every step received and returned. How workflows work explains the model.
Step 1: Model the data the automations watch#
Workflows usually watch your own entities. The support desk has one.
| Entity | Field | Type | Notes |
|---|---|---|---|
tickets |
title |
Small text | Required. The name field. |
tickets |
requester_email |
Small text | Who raised it. |
tickets |
priority |
Small text | low, normal or urgent. |
tickets |
status |
Small text | open or resolved. |
In the Anythink dashboard
- Go to Settings › Data Model and select Add Entity. Name it
ticketsand select Create Entity. - Select Add Field and add
title(Small text, tick Required and Name field),requester_email,priorityandstatus(all Small text).
With the CLI
anythink entities create tickets
anythink fields add tickets title --type varchar --required --name-field
anythink fields add tickets requester_email --type varchar
anythink fields add tickets priority --type varchar
anythink fields add tickets status --type varchar
With an AI assistant (MCP)
Create an entity called tickets with a required title (name field) and small text fields requester_email, priority and status.
The assistant runs entities create and one fields add per field through the cli tool. Connect Claude to your backend with MCP sets up the server. For every field type, see Model your data.
Step 2: Start a workflow when data changes#
An Event trigger starts a job when a record is created or updated. A trigger filter adds a condition, so the workflow ignores everything else. This one fires only when a ticket is created with the priority urgent, and posts to Slack.
Connect Slack to your project first. Post to Slack when a record is created walks through it.
In the Anythink dashboard
- Open Workflows and select New Workflow. Name it
urgent-ticket-alert. - Leave Trigger Type as Event. Set Event Type to Entity Created and Entity to
tickets. - Under Fire only when…, select Add filter. Set the field to
priority, the operator to equals and the value tourgent. - Select Create Workflow, then Add Step and choose Integration. Name it
Alert the teamwith the Keyalert_team. - Choose the Slack provider and the Send Message operation. Enter the channel
#supportand the messageUrgent ticket: {{ $anythink.trigger.data.title }}. - Save the step, make it the start step, save the workflow and select Enable Workflow.
With the CLI
anythink workflows create urgent-ticket-alert \
--trigger Event --event EntityCreated --entity tickets \
--filter '{"field":"priority","op":"eq","value":"urgent"}' \
--enabled
anythink workflows integration-add <workflow_id> alert_team \
--name "Alert the team" --provider slack --operation send-message \
--credential-source system --start --enabled \
--inputs '{"channel":"#support","text":"Urgent ticket: {{ $anythink.trigger.data.title }}"}'
workflows create prints the workflow's id. Use it in the next command.
With an AI assistant (MCP)
Create a workflow called urgent-ticket-alert that runs when a record is created in tickets and its priority is urgent. Add a Slack Send Message step with the key alert_team that posts "Urgent ticket: " and the ticket's title to #support. Make it the start step and enable the workflow.
The assistant runs workflows create and workflows integration-add through the cli tool.
Step parameters can hold {{ … }} templates. {{ $anythink.trigger.data.title }} is a field of the record that started the job. Template syntax lists every expression.
A trigger can also match updates. The filter operator changed_to compares the record before and after, so a workflow can fire once when status becomes resolved, and not on every later edit.
Step 3: Send an email when something happens#
The Send An Email step sends a template to one recipient. Create the template and verify a sending domain first. Send email from a workflow covers both. Here the template is ticket_resolved, and the step emails the requester when a ticket's status changes to resolved.
In the Anythink dashboard
- Open Workflows and select New Workflow. Name it
ticket-resolved. - Set Event Type to Entity Updated and Entity to
tickets. - Under Fire only when…, add a filter:
status, changed to,resolved. - Select Create Workflow, then Add Step and choose Send An Email. Give it the Key
email_requester. - Enter
{{ $anythink.trigger.data.requester_email }}as the To Email Address and pick theticket_resolvedtemplate. - Save the step, make it the start step, save the workflow and select Enable Workflow.
With the CLI
anythink workflows create ticket-resolved \
--trigger Event --event EntityUpdated --entity tickets \
--filter '{"field":"status","op":"changed_to","value":"resolved"}' \
--enabled
anythink workflows step-add <workflow_id> email_requester \
--name "Email requester" --action SendAnEmail --start --enabled \
--params '{
"to": "{{ $anythink.trigger.data.requester_email }}",
"template_type": "ticket_resolved",
"payload": "{\"title\":\"{{ $anythink.trigger.data.title }}\"}"
}'
payload is a string that holds JSON, so its inner quotes are escaped.
With an AI assistant (MCP)
Create a workflow called ticket-resolved that runs when a record in tickets is updated and its status changes to resolved. Add a Send An Email step with the key email_requester that emails the ticket's requester_email using the ticket_resolved template, with title filled from the ticket. Make it the start step and enable the workflow.
To reach a phone or browser instead, swap the step for Send a Push Notification. It sends to one user's registered devices, a group, or everyone, and an action button on the notification can start another workflow. Push notifications from a workflow has the full set-up, and Workflow recipes has a ready-made "order shipped" push.
Step 4: Run a workflow on a schedule#
A Timed trigger runs on a cron schedule. Schedules are five-field cron, in UTC, checked once a minute. A scheduled job has no record behind it, so its steps take everything they need from their own parameters.
In the Anythink dashboard
- Open Workflows and select New Workflow. Name it
nightly-cleanup. - Set Trigger Type to Timed and enter the cron expression
0 2 * * *. - Select Create Workflow, add the steps you need, then select Enable Workflow.
With the CLI
anythink workflows create nightly-cleanup \
--trigger Timed --cron "0 2 * * *" --enabled
To try it without waiting until 02:00, trigger a run by hand and read the result:
anythink workflows trigger <workflow_id>
anythink workflows jobs <workflow_id>
With an AI assistant (MCP)
Create a workflow called nightly-cleanup that runs at 02:00 UTC every day, and enable it.
Workflow recipes builds a nightly clean-up that deletes expired records, with the step that finds them. Delete Data requires at least one filter condition, so a step can't empty an entity by accident.
Step 5: Let another system start a workflow#
An API Call trigger gives a workflow its own route. A form service, a partner or a script posts JSON to it, and the body becomes the trigger data. The caller authenticates with an API key that holds the anythink_workflows:trigger permission, and nothing else.
In the Anythink dashboard
- Open My Account, select the API Keys tab and create a key named
ticket-formwith only Anythink Permissions › anythink_workflows:trigger. Copy it now, it's shown once. - Open Workflows and select New Workflow. Name it
ticket-intake. - Set Trigger Type to API Call and enter the route
ticket-intake. - Select Create Workflow, add a Create Data step that writes the
ticketsrecord from the payload, then select Enable Workflow.
With the CLI
anythink api-keys create ticket-form \
--permissions anythink_workflows:trigger \
--expires-in 90 \
--yes
anythink workflows create ticket-intake \
--trigger Api --api-route ticket-intake --enabled
anythink workflows step-add <workflow_id> create_ticket \
--name "Create ticket" --action CreateData --start --enabled \
--params '{"entity_name":"tickets","payload":"{\"title\":\"{{ $anythink.trigger.data.subject }}\",\"requester_email\":\"{{ $anythink.trigger.data.email }}\",\"priority\":\"normal\",\"status\":\"open\"}"}'
The CLI prints the key once. Store it in the sender's secret store.
With an AI assistant (MCP)
Create a workflow called ticket-intake with an API route trigger on ticket-intake. Add a Create Data step with the key create_ticket that writes a tickets record from the payload's subject and email, with priority normal and status open. Enable it.
Ask the assistant to create the API key in your terminal or the dashboard, not in the chat, so the key never passes through the conversation.
The sender then calls the route:
curl -X POST "https://api.my.anythink.cloud/org/{project_id}/workflows/api/ticket-intake" \
-H "x-api-key: $TICKET_FORM_KEY" \
-H "Content-Type: application/json" \
-d '{"subject": "Printer is down", "email": "sam@example.com"}'
The response is 204 No Content as soon as the job is queued. It doesn't wait for the workflow to run, so write anything the caller needs to read back to a record. The record the intake workflow creates also fires the urgent-ticket trigger from step 2, because workflows that write data through the normal API fire event triggers. Webhooks covers the route rules, calling out to other services with the Call An API step, and receiving Stripe and Apple payment events.
Step 6: Check it worked#
Every run is a job. Open its history to see what each step received and returned, and to find the step that failed.
In the Anythink dashboard
Open the workflow and select View Job History. Open a job to read each step's log and output. Test Workflow in the editor runs a workflow with a payload you type, without waiting for its trigger.
With the CLI
anythink data create tickets --data '{"title":"Printer is down","requester_email":"sam@example.com","priority":"urgent","status":"open"}'
anythink workflows jobs <workflow_id>
Each job shows its status: Pending, Running, Success or Failed.
With an AI assistant (MCP)
Show me the recent jobs for urgent-ticket-alert and tell me why any failed.
The assistant runs workflows jobs and reads each failed job's step errors. Test workflows and read job history covers failure paths and rerunning a failed job.
What you get, and the limits#
What you get
- Four kinds of start: a record being created or updated, a cron schedule, a button or API call, and a webhook-style route with its own key.
- Email, push, Slack, calendar, AI and any HTTP service as steps, with credentials stored encrypted and used by name.
- A job history for every run, with each step's input, output and error.
- Every automation buildable and editable from the Anythink dashboard, the CLI or an AI assistant, so it can live in scripts and review.
Limits to plan around
- Workflows act as a trusted service. Steps don't run as the person who started the job. Reads ignore row-level security, and records a workflow creates have no owner unless the step grants one. Give workflow permissions only to people you'd trust with project-wide data access. See How workflows work.
- No automatic retries. A failed step stops that path of the job. Link its on failure handle to a step that tells you, or rerun the job.
- Schedules are UTC. Five-field cron, one-minute resolution, and a run missed while nothing was running isn't made up later.
- Job order isn't guaranteed. Jobs run concurrently, so don't rely on one workflow finishing before the next starts.
- A workflow can trigger itself. Create Data and Update Data steps fire event triggers, including on the entity the workflow watches. Use a trigger filter to stop a loop.
- Step and time limits. A job runs at most 250 steps. Run Script gets 30 seconds, 64 MB and no network access, and Call An API gets 30 seconds per request to the public internet.
- No sub-workflows. Put shared logic in each workflow, or have one workflow write a record that another workflow's event trigger watches.
- The caller doesn't get a result. An API route returns
204once the job is queued. - Runs are metered. Your plan sets a monthly workflow quota. See Limits and quotas.