Automations
Automations let your assistant act proactively without waiting for you to send a message. There are two types: routines (scheduled) and webhook triggers (event-driven).
Routines
A routine is a recurring prompt that the assistant executes on a schedule. Use routines for tasks that should happen at regular intervals.
Creating a routine
In the dashboard, go to Assistant > Routines and click New routine. Provide:
- Name -- a short label (e.g., "Morning briefing").
- Prompt -- what the assistant should do when the routine fires (e.g., "Generate my daily briefing and send it to Telegram").
- Schedule -- a cron expression or natural language (e.g., "every weekday at 8:30am").
- Channel -- where to deliver the output (web, Telegram, Discord, Slack, or SMS).
You can also create routines via the API:
curl -X POST https://api.fold.run/routines \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Morning briefing",
"prompt": "Generate my daily briefing with calendar, tasks, and reminders.",
"schedule": "every weekday at 8:30am"
}'Natural language schedules are converted to cron expressions automatically. Supported patterns include "every day", "every weekday at 9am", "every Monday morning", "every 4 hours", and standard cron syntax.
Managing routines
Each routine can be enabled or disabled from the dashboard. You can also view run history, including when each routine last fired and how many times it has run.
Webhook triggers
Webhook triggers let external services activate your assistant. When a webhook fires, the assistant executes a prompt you define -- similar to routines, but event-driven instead of time-driven.
Creating a webhook trigger
In the dashboard, go to Assistant > Webhook triggers and click New trigger. Provide:
- Name -- a label for the trigger.
- Source -- the external service (e.g., GitHub, Stripe, or custom).
- Event filter -- optionally filter by event type (e.g., "push" for GitHub).
- Prompt -- what the assistant should do when triggered (e.g., "Summarize the GitHub push and notify me on Slack").
- Secret -- an optional HMAC secret for verifying webhook signatures.
The trigger returns a unique webhook URL. Configure your external service to send events to this URL.
Example: set up a webhook via the API
curl -X POST https://api.fold.run/webhook-triggers \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "GitHub push summary",
"source": "github",
"event_filter": "push",
"prompt": "Summarize the commit messages and notify me.",
"channel_provider": "slack"
}'Morning briefings
A morning briefing is a common routine pattern. The assistant gathers your calendar events, overdue tasks, pending tasks, and due reminders, then generates a concise summary in your chosen communication style.
To set one up, create a routine with a prompt like "Generate my daily briefing" and schedule it for your preferred morning time. The assistant uses your soul document to match the tone and format you prefer.