Automations
Automations run scheduled prompts. The optional Workflows plugin runs saved recipes.
- Automations are a saved prompt plus a trigger. They run themselves, on a schedule or at a time you name, and can deliver the result to a channel.
- Workflows are a declared step recipe you run on demand. Each data step stores a receipt; the final summarize step only sees those receipts.
To schedule a workflow, install the Workflows plugin and assign its workflow tools to the automation’s agent. Ask Super Nakama to create an automation with a prompt like Run my "Morning brief" workflow (id wf_123), using that agent.
See Workflows for the step kinds and receipt model.
Automations
An automation is a name, a prompt, a profile, and one trigger:
| Trigger | Shape | Scheduled behavior |
|---|---|---|
manual | none | Never starts by itself |
schedule | 5-field cron plus a timezone | Runs each time the cron matches |
runAt | an ISO timestamp plus a timezone | Tries to run once at that instant, then disables itself |
webhook | none | Never starts by itself. A signed request from another service starts a run |
The profile is which agent soul, tools, and skills the run uses. Edit an automation to pick a different profile; the detail view shows the bound profile name. Creating from the API without a profileId uses the org default profile. Creating from chat without a profileId uses the chat profile. Members cannot bind Super Nakama.
Cron is validated on save, so a malformed expression is rejected rather than silently never firing. The timezone defaults to the one in your user config. nextRunAt is computed from the cron and shown in the list, which is the fastest way to check that a schedule means what you think it means.
A runAt automation whose timestamp has already passed is not scheduled. Disabled automations are not scheduled either, whatever their trigger.
Start a run from GitHub
A webhook trigger lets GitHub start a run when something happens in a repository, such as a push, a new issue, or a pull request. The agent reacts within seconds and you do not need a schedule that polls for changes.
Before you start:
- GitHub must reach Nakama over public HTTPS. Put Nakama behind a reverse proxy with TLS (see Docker). Set
NAKAMA_WEB_PUBLIC_URL(orweb_public_urlinconfig.ini) to that HTTPS address, and the webhook URL on the automation uses it. When it is not set, the webhook URL uses the address in your browser. Alocalhostaddress does not work. - The server must have
NAKAMA_SECRETS_KEYset. Make one withopenssl rand -base64 32. Without it, Nakama refuses to make a webhook secret. - If the profile has the email tool, only an org admin can make the secret.
Set it up:
- Open the automation, select Edit, choose On webhook under How often?, and select Save changes.
- On the automation, select New secret, then Make secret. Copy the secret now: Nakama shows it only once. Copy the webhook URL too.
- In GitHub, open the repository Settings → Webhooks → Add webhook.
- Paste the URL into Payload URL, set Content type to
application/json, paste the secret into Secret, pick the events, and select Add webhook.
What to expect:
- GitHub sends a
pingfirst. Nakama accepts it and does not start a run. - Each accepted delivery starts one run, marked Webhook in the run history. The same delivery sent twice starts only one run.
- A delivery that arrives while a run is active, or while the automation is turned off, gets
409and starts nothing. Use Redeliver in GitHub later. - Payloads over 256 KiB get
413. - The signature covers only the body. Keep the secret and the payloads private: anyone with a signed request can send it again.
- The agent gets the payload as data after your prompt, with an instruction never to follow text inside it. Write the prompt so it says what to do with the event.
- Runs use the sign-ins of the person who made the secret. When someone else changes the prompt, profile, delivery, or tool limit, runs use their sign-ins and the old secret stops working. Make a new secret and update it in GitHub.
- The secret also stops working when the person who made it loses access: they are removed from the organization, changed from admin to member, or disabled, they change or reset their password, or a platform admin signs them out of all sessions. GitHub then gets
401. Make a new secret and update it in GitHub. - New secret replaces the old secret at once. Update it in GitHub. Changing the trigger away from On webhook deletes the secret, so you need a new one if you switch back.
The worker and schedule reloads
Scheduled runs are driven by the automation worker, a separate process managed by PM2 alongside the channel bridges. It reports a heartbeat, so Settings → Workspace → Workers tells you whether schedules are actually being served. If the worker is down, manual runs from the dashboard still work and scheduled ones do not fire.
The worker loads the schedule list at startup and reloads it on a polling interval. The default interval is five minutes, and it accepts 1 to 1440 minutes. An organization admin can change it on System → Organization, on the Auto clean-up of skills card, under How bots learn skills → Customize. Polling doesn't send a live schedule-change event to the worker.
This reload boundary matters for new schedules. A schedule created just after a reload can wait for the next poll before it is registered. A one-time runAt that passes before the worker sees it is missed rather than caught up later. Allow for the polling interval when you create time-sensitive one-time automations, and make sure the worker is running before you create them.
See Docker for how the worker is started in a container.
Run history
Every run is recorded with a status of running, completed, or failed, plus its output or error and start and finish timestamps. Open a run to read the full output or copy its text. Opening an automation automatically marks its runs read, so the unread dot and notification count clear without a separate Mark runs read control.
You can start any enabled automation manually with Run now, the run API, or the chat automation tool. Run again appears on a failed run and starts the automation again. It does not retry a completed one-time runAt: that automation disables itself before its first run, including when that run fails, so Run again reports that it is disabled. Create another one-time automation when you need a fresh timestamp.
Unread run counts feed the Notifications page, so a schedule that started failing overnight is visible without opening each automation.
Delivering the result
An automation can post its result to a channel instead of leaving it in the run log.

| Channel | Target |
|---|---|
telegram | All paired users, or one chatId |
discord | All paired users by DM, or one channel by channelId |
whatsapp | All paired users |
email | The to address, which is required |
notifyOn decides which runs deliver: success (the default), failure, or both. Each run records sent, failed, or skipped when delivery is configured and attempted. A run with no delivery configuration has a null delivery status; null does not mean that delivery was skipped. Failed deliveries also record the error.
Delivery configuration is validated on save against the channels the instance has. Pointing an automation at a channel with no configured bridge fails at save time instead of silently failing on a later run.
Permissions
Organization members can create or change automations. A caller-supplied profileId on create or update is checked against what that caller may use, so a member cannot bind an automation to the bash-capable Super Nakama profile. See Multi-tenancy for the role model.
API
| Method | Path |
|---|---|
GET POST | /v1/automations |
GET PUT DELETE | /v1/automations/:automationId |
POST | /v1/automations/:automationId/run |
GET | /v1/automations/:automationId/runs |
POST | /v1/automations/:automationId/runs/mark-read |
POST | /v1/automations/draft |