
# Migrate from Zapier to Sovrium

A Zapier "Zap" is a trigger followed by one or more action steps. A Sovrium automation is the same shape — declared in config, run on your own server, with no task limits.

## Map the steps

| Zapier                         | Sovrium                                              |
| ------------------------------ | ---------------------------------------------------- |
| Trigger (app + event)          | `trigger` — `{ type: 'record', events: ['create'] }` |
| Action: Webhooks by Zapier     | `{ type: 'http', operator: 'post' }`                 |
| Action: send email             | `{ type: 'email', operator: 'send' }`                |
| Action: create/update a record | `{ type: 'record', operator: 'create' }`             |
| Filter step                    | an automation `filter`                               |
| `{{field}}` mapping            | `{{trigger.data.field}}` template variables          |

## Declare the automation

This app posts every new `leads` row to an outbound webhook — a complete, runnable config:

```ts
export default {
  name: 'lead-intake',
  version: '1.0.0',
  tables: [
    {
      name: 'leads',
      fields: [
        { name: 'email', type: 'email', required: true },
        { name: 'source', type: 'single-line-text' },
      ],
    },
  ],
  automations: [
    {
      name: 'notify-on-new-lead',
      trigger: { type: 'record', table: 'leads', events: ['create'] },
      actions: [
        {
          type: 'http',
          operator: 'post',
          name: 'postToWebhook',
          props: {
            url: 'https://hooks.example.com/new-lead',
            body: { email: '{{trigger.data.email}}' },
          },
        },
      ],
    },
  ],
}
```

## Run and verify

```bash
sovrium start app.ts
```

Create a `leads` record (`POST /api/tables/leads/records`) and the webhook fires. Inspect every run in the admin dashboard's automation-run history.

## What doesn't map

Zapier's hosted third-party **app connectors** have no drop-in equivalent — Sovrium's `http` action calls any API directly, and OAuth-based services use a [connection](/en/docs/automation-connections). Multi-step branching becomes automation [flow control](/en/docs/automation-flow-control).
