Guides5 min read
Building automations
A practical guide to building reliable multi-step automations.
The anatomy of an automation
Every automation has three parts: a trigger, one or more steps, and an error path. Let's build one together.
Example: PR merged → notify → close ticket
This is the most common automation in Ion. Here's how to build it:
- Go to Automations → New automation.
- Choose the GitHub trigger:
Pull request merged. - Add a Filter step:
branch == "main". - Add a Slack step:
Post messageto#launcheswith the PR title and summary. - Add a Linear step:
Close ticketlinked in the PR description. - Configure the error path: notify
#engineeringif any step fails after 3 retries. - Click Enable.
Best practices
- Start narrow. Filter early — don't run an automation on every event when you only care about 5% of them.
- Idempotency. Automations can fire multiple times for the same event. Design steps to be safe to re-run.
- Test before enabling. Use the Test run button with a real past event before going live.
- Watch the audit log. Every run is logged per-step. If something breaks, you'll see exactly where.
Common patterns
Rate limiting
Add a Debounce step to batch rapid-fire events. Useful for things like "notify on every commit" without spamming.
Conditional branching
Use the If/else step to route based on data. Each branch can have its own steps and error paths.
Loops
Use the For each step to iterate over arrays — e.g., close every ticket linked in a PR.