Skip to content
All docs
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:

  1. Go to Automations → New automation.
  2. Choose the GitHub trigger: Pull request merged.
  3. Add a Filter step: branch == "main".
  4. Add a Slack step: Post message to #launches with the PR title and summary.
  5. Add a Linear step: Close ticket linked in the PR description.
  6. Configure the error path: notify #engineering if any step fails after 3 retries.
  7. 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.