Help center

Take 10 minutes.
Get hours back every week.

Short walkthroughs that turn the platform into your operations team: automated pipelines, instant follow-ups, AI-handled admin. One video, one less thing to do manually.

Automations

Build an Automation in One Call

How to create a complete automation — trigger and actions — in a single API or MCP call instead of three separate requests.

The TrustPager API and MCP server both let you build a complete automation — trigger, actions, and all — in a single call. Instead of creating the automation first, then adding a trigger, then adding each action, you can pass everything inline and have the automation live in seconds.

Why this matters

The traditional multi-step approach works fine in the builder UI, but when an AI agent or script is standing up automations programmatically — say, during a client onboarding run — three round-trips per automation adds up fast. The inline approach collapses that to one.

How it works — REST API

Send a single POST to /api/v1/automations with the trigger and actions arrays included in the body:

POST https://app.trustpager.com/api/v1/automations
Authorization: Bearer <your_api_key>
Content-Type: application/json

{
  "name": "New lead — welcome email",
  "enabled": true,
  "trigger": {
    "trigger_type": "contact_created",
    "config": {}
  },
  "actions": [
    {
      "action_type": "send_email",
      "config": {
        "subject": "Welcome to {{company_name}}",
        "body": "Hi {{contact_first_name}}, great to have you on board.",
        "to": "{{contact_email}}"
      }
    }
  ]
}

Your API key is available at https://app.trustpager.com/settings/api.

The trigger object only needs trigger_type and config. The source_type field is auto-populated by the API based on the parent automation's trigger_type — you don't need to include it. (Pass it explicitly only if you want to override the default, e.g. "any" for a wildcard match.)

The response includes the new automation's id, its trigger's id, and the id of each created action — all in one go.

How it works — MCP

If you are using the TrustPager MCP server (for example via Claude), pass the same inline arrays to create_automation:

create_automation(
  name: "New lead — welcome email",
  enabled: true,
  trigger: {
    trigger_type: "contact_created",
    config: {}
  },
  actions: [
    {
      action_type: "send_email",
      config: {
        subject: "Welcome to {{company_name}}",
        body: "Hi {{contact_first_name}}, great to have you on board.",
        to: "{{contact_email}}"
      }
    }
  ]
)

The multi-step approach (create_automationadd_automation_triggeradd_automation_action) still works and is the right choice when you need to modify an existing automation. For net-new automations, inline is faster.

Adding multiple actions

The actions array is ordered — actions run top-to-bottom in the sequence you define. To send an email and then create a task, for example:

"actions": [
  {
    "action_type": "send_email",
    "config": {
      "subject": "Your enquiry",
      "body": "Thanks for getting in touch, {{contact_first_name}}.",
      "to": "{{contact_email}}"
    }
  },
  {
    "action_type": "create_task",
    "config": {
      "title": "Follow up with {{contact_first_name}}",
      "due_in_days": 2
    }
  }
]

Finding trigger types and action types

Use the schema endpoints to see what trigger types and action types are available, along with the exact config fields each one accepts:

  • REST: GET https://app.trustpager.com/api/v1/schemas/triggers and GET https://app.trustpager.com/api/v1/schemas/actions
  • MCP: list_trigger_schemas and list_automation_actions

Both endpoints return sample payloads and the {{variable}} tokens available in each config value. They are free (0 credits).

See also the https://trustpager.com/help-center/trigger-schema-reference for a full reference of every trigger type.

Enabling and disabling

Set "enabled": false in the body to create the automation in a paused state — useful when you want to review the setup before it goes live. You can flip it on later from https://app.trustpager.com/automations or by calling enable_automation via the MCP.

Troubleshooting

  • Actions not running — check that "enabled": true is set and that the trigger type matches the event you expect. The full run log is at https://app.trustpager.com/automations.
  • Unknown trigger type / action type — call the schema endpoints to get the exact string TrustPager expects. Casing matters.
  • Config validation errors — the API returns a 422 with a field-level error message if a required config key is missing. Check the schema for that action type to see what is required.
  • form_submitted trigger returning a 400form_submitted was a deprecated trigger type that never actually fired automations. It is now removed. Update your trigger object to use "trigger_type": "form_completed" — that's the working trigger for form submissions. If you had existing automations using the old name, they were migrated automatically; this only affects new calls.

Related

The last piece

Two ways to
meet FinalPiece.

Talk to Evie right now, or book a real human for a deeper walkthrough. Whichever feels right.

01 · Talk to Evie

Pick up the phone.

Hear her in 10 seconds.

Evie
VOICEMeet Evie
  • RealHer voice passes for human.
  • SmartKnows your prices, hours, and trade.
  • PatientPolite, attentive, never has a bad day.
or
02 · Book a demo

Pencil us in.

60 minutes with a real human · Google Meet · Free.

June 2026
S
M
T
W
T
F
S
Loading…