Manage automations via MCP
7 min
use mcp when you want an ai client or external operator to inspect, create, update, or test peach automations through tools instead of the ui mcp is best for structured setup and maintenance work, such as creating an automation from a plain english brief, checking how a rule is configured, wiring a trigger to an event payload, or running a controlled test against a contact for pipeline specific setup, keep using pipeline automations # mcp can work with automation streams and triggers, but the pipeline guide is the clearer starting point for enrollment rules, stage movement, and stage lifecycle behavior what mcp can manage peach exposes automation management through account scoped mcp tools task mcp tool list automations peach list automations inspect one automation peach get automation create an automation peach create automation update automation metadata or definition peach update automation run an automation for a contact peach trigger automation list trigger conditions peach list expressions list triggers on an automation peach list triggers create a trigger peach create trigger dry run a trigger condition peach evaluate trigger condition search recent events for debugging peach search events there is also a built in mcp resource, peach //guides/automations , that describes automation step types, payload shapes, and event payload schemas read it before creating or changing an automation definition recommended create flow when creating an automation through mcp, use this sequence read peach //guides/automations use peach list expressions to find the event condition peach should listen for use peach create automation to create the automation's action definition use peach create trigger to connect the automation to the event use peach evaluate trigger condition with a sample payload use peach trigger automation only when you want to run the automation for a real or test contact an automation created with peach create automation defines what peach should do it does not run by itself it needs a trigger, created with peach create trigger , to define when it should run automation definitions mcp created automations are definition driven streams when creating one, provide field meaning name human readable automation name description optional note for future maintainers definition step graph with start step and a steps map playbook kind use notification only for a single template notification automation use advanced for anything more complex status optional use draft , published , or archived business phone number optional wa id for the sending number if omitted, peach uses the account's first available phone number if you update an automation's definition , include playbook kind again if a notification automation grows beyond a single template shape, change it to advanced trigger setup triggers connect an event to an automation use peach create trigger with field meaning stream id the automation id, such as strm condition the expression name from peach list expressions source optional integration name when the same condition name exists in more than one source variables values needed by the condition data mappings jsonpath mappings that pull fields from the event payload into the automation context activate set to true when the trigger should start listening immediately always include a recipient mapping when the automation needs to message or operate on a contact without a resolved recipient, the automation will not have a contact to run against example recipient mapping \[ { "mapping for" "recipient", "value" { "phone number" "$ contact phone number" } } ] use additional variable mappings when steps need payload values, such as an order id, customer name, amount, or booking date testing and debugging use mcp testing tools before activating broad automations check tool confirm the automation exists and has the expected definition peach get automation confirm the trigger is attached to the right automation peach list triggers check whether a sample event payload matches peach evaluate trigger condition find recent incoming events by topic peach search events run the automation for a known contact peach trigger automation for api or integration triggered automations, test with a payload that matches the real event shape most mcp setup issues come from the wrong condition, missing variables, or a jsonpath that does not resolve to a phone number safe operating guidance start new automations in draft unless you are intentionally going live use plain names that describe the customer facing outcome keep the ui and mcp view aligned by checking the automation in peach after large changes do not use mcp to recreate opt in or opt out account setup flows prefer the visual editor for complex branching when a human needs to maintain the flow regularly