TrustPager Docs

← Help Center

Automations

Trigger Schema Reference

How to discover what fields each automation trigger type expects, using the schema API endpoints and MCP tools, with example payloads for common trigger types.

Every automation trigger in TrustPager has a defined schema, the exact fields it expects, their types, and which are required. This reference explains how to discover those schemas via the API and MCP, and walks through the common trigger types and their payloads.

Discovering trigger schemas via the API

Rather than guessing what fields a trigger needs, you can query the schema directly.

List all trigger types:

GET /api/v1/schemas/triggers

Returns every available trigger type with a sample payload and the {{variable}} tokens you can use in trigger_data. Free (0 credits).

Get one trigger's schema:

GET /api/v1/schemas/triggers/{trigger_type}

# Example:
GET /api/v1/schemas/triggers/facebook_lead_ad

Returns the full schema for that trigger, field names, data types, required vs optional, and example values.

Via MCP:

These tools are the right starting point any time you're building a new integration or wiring up an external event source, they tell you exactly what the trigger expects before you write a line of code.

Common trigger types and their payloads

Below are the most frequently used trigger types. Exact field names and additional optional fields are always available via the schema endpoints above.

Stage Change

Fires when an opportunity moves between pipeline stages.

{
  "trigger_data": {
    "deal_id": "{{deal_id}}",
    "from_stage_id": "{{from_stage_id}}",
    "to_stage_id": "{{to_stage_id}}"
  }
}

Form Submission

Fires when a contact submits a TrustPager form. Use the trigger type form_completed.

{
  "trigger_data": {
    "form_id": "{{form_id}}",
    "contact_id": "{{contact_id}}",
    "submission_id": "{{submission_id}}"
  }
}
Deprecated trigger type: form_submitted was a legacy stub that never wired to the automation engine, no event ever fired it. It has been removed; automations that had it set were automatically migrated to form_completed (the working trigger for form submissions). New automations that try to use form_submitted get a 400 error pointing to form_completed.

New Contact Created

Fires when a contact is added to the CRM.

{
  "trigger_data": {
    "contact_id": "{{contact_id}}"
  }
}

Tag Added

Fires when a tag is added to an opportunity, from anywhere (the opportunity page, the board, the API, an import or another automation). It runs once per tag added, within about a minute. Put the tag in the trigger config and leave source_id empty. A tag in source_id is refused with a clear message. Leave the tag out to run on any tag added.

{
  "trigger_type": "tag_added",
  "config": { "tag": "Resend welcome email" }
}

Tags already on an opportunity when it is created do not fire this trigger. Use Opportunity Created for that. Exact field names are at https://docs.trustpager.com/reference#automations.

Retired trigger: Opportunity Updated no longer fires and cannot be added to new automations. Editing an opportunity no longer starts automations, so the skip_automations option on update_opportunity was removed. Use a stage change, Opportunity Won or Lost, Tag Added, Custom Field Changed, or a manual trigger instead. To run when a job status changes, use Custom Field Changed.

Custom Field Changed

Fires when one opportunity custom field has just changed to one chosen value. Only dropdown and checkbox fields can be watched. Use source_type custom_field, leave source_id empty, and put the field id and the value in the config. For a dropdown the value is one of its options. For a checkbox it is true or false.

{
  "trigger_type": "custom_field_changed",
  "source_type": "custom_field",
  "config": { "field_id": "<custom field id>", "value": "Scheduled" }
}

The API checks that the field exists, is a dropdown or checkbox, and that the value is a valid option. Matching is not case sensitive and the value is saved with the exact spelling of the option. It refuses to create a custom_field_changed automation with no trigger rows.

It fires only when the field just became that value. Values present when the opportunity is created do not count, and saving again without changing the field does not fire. It works from the opportunity page, the board, the API, an import or another automation. There is a limit of 10 field-change runs per opportunity per hour. Conditions and actions can use field_label, field_value and previous_field_value, plus the opportunity name, value, currency, status, type, lead source, tags, pipeline, stage and contact. Exact field names are at https://docs.trustpager.com/reference#automations.

Webhook Received

Fires when an external system sends a payload to a TrustPager incoming webhook. The full webhook body is available as trigger data. Configure incoming webhooks at https://app.trustpager.com/settings/webhooks.

Facebook Lead Ad

Fires when a new lead is submitted via a connected Facebook Lead Ad form.

{
  "trigger_data": {
    "lead_id": "{{lead_id}}",
    "form_id": "{{form_id}}",
    "page_id": "{{page_id}}",
    "full_name": "{{full_name}}",
    "email": "{{email}}",
    "phone": "{{phone}}"
  }
}

Manual

Fires when triggered explicitly, either via the UI button on an opportunity, or via the API/MCP. No required trigger data fields, though you can pass context.

{
  "trigger_data": {
    "contact_id": "{{contact_id}}"
  }
}

Using {{variable}} tokens

Variable tokens like {{contact_id}} in schema examples are placeholders, replace them with actual IDs or values when making your API call. They're used in schema docs to show you what type of value goes in each field, not as templating syntax in your request body.

Where to go next

Once you know the schema for your trigger type, you're ready to fire it. See https://trustpager.com/help-center/trigger-automations-via-api-mcp for the full walkthrough on calling the trigger endpoint and handling the response.

Tip: Schema endpoints are free (0 credits) and can be called as often as needed, they're safe to call at agent startup to build a local index of available trigger types.
← Back to Help Center Open on trustpager.com ↗