Get template
Get one template by slug: full prompt, default schedule, model level, output channels, and required integrations. Clients that support creating automations can pass the slug as sourceDefaultTaskSlug to link the new automation to its template.
/automation-templates/{slug}AuthorizationBearer token · headerrequiredOrganization API key (modem_…).
slugstringrequiredOK
descriptionstring | nullrequiredShow propertiesHide properties
stringnullmodelLevelstringrequiredModel quality/speed tier persisted for automation execution.
highlowmednamestringrequiredoutputChannelsobject[] | nullrequiredShow propertiesHide properties
objectchannelstringrequireddiscordemailmsteamsslackdestinationsstring[] | nullrequiredShow propertiesHide properties
stringstringnullmodestringrequiredany-internalanyspecificnullpromptstringrequiredrelatedTemplatesstring[]requiredrequiredIntegrationsstring[]requiredscheduleobjectrequiredDefines when an automation should run.
Show propertiesHide properties
exprstringrequiredStandard cron expression string.
typeanyrequiredrrulestringrequirediCalendar recurrence rule (RFC 5545) string.
typeanyrequiredatstringrequiredISO 8601 timestamp for one-time execution.
typeanyrequirednintegerrequiredNumber of time units between executions.
typeanyrequiredunitstringrequiredTime unit for interval scheduling.
hoursminuteschannelIdsstring<uuid>[]Optional channel scope: message channel UUIDs this automation is limited to. Omit for all channels (global). Only valid when every selected event supports channel scoping (see EVENT_CHANNEL_SCOPING).
conditionstringOptional free-form natural-language condition ("only run when …"), up to 2000 characters, evaluated against each trigger event's payload; the automation runs only for events that satisfy it. Omit to run on every matching event. A condition also satisfies an event that requires a channel or product scope.
conditionModestringServer-derived; ignored on input. judge = the condition is decided from the event payload before the run starts; agent = the agent decides it at the start of every run.
agentjudgeconditionSchemaVersionintegerServer-derived; ignored on input. The version of the event field guide the condition was judged against; absent when it was not judged.
delaySecondsintegerOptional delay, in seconds, before running the automation after its trigger event fires (e.g. 1800 = 30 minutes after the event). Omit for immediate execution. Maximum 604800 (7 days).
eventstringLegacy single-event trigger (e.g., github.pr.created). Still accepted on read/write for backwards compatibility; prefer events for new writes. When both are present, events is canonical.
eventsstring[]Trigger events for this automation (e.g., ["github.pr.created", "github.pr.dismissed"]). The automation fires once per matching event occurrence. Canonical form — prefer this over the legacy event field.
filterstringOptional filter on an activity event's payload, checked before any trigger condition or agent runs. One CEL expression: field == 'value' or field in ['a', 'b'], joined with && and || (parentheses allowed). Fields: chat.activity, call.activity, feedback.activity: source.name, placement, author.role, topic.priority_change, audience; support_ticket.activity: those and support_ticket.status; social_post.activity: those and social_post.kind; pull_request.activity: source.name, change.kind, base.ref (the branch it merges into; == and in match it exactly, base.ref.matches('^release/') takes an RE2 regex), audience; issue.activity: source.name, change.kind, audience. audience is internal (only the organization can read where the item lives) or public (people outside it can, or Modem cannot confirm it is internal). On a conversation activity event, source.name is one of its built-in sources or a custom source's name. E.g. "source.name in ['zendesk', 'intercom'] && author.role == 'customer'". Omit to run on every occurrence. Valid on one activity event, or on several conversation activity events, where it may name only source.name, placement, author.role, topic.priority_change and audience.
productIdsstring<uuid>[]Optional product scope: the products this automation is limited to. Omit for all products (global); an empty array is rejected so 'global' has one representation. Acts as a channel preset — at dispatch time the scoped products' currently linked message channels (product_channels) are resolved and the automation fires when the triggering event's channels intersect ANY of them. It additionally instructs the agent to scope the run's output to those products. May be combined with channelIds — both scopes must pass (AND semantics).
targetBranchesstring[]Optional case-sensitive allowlist of GitHub PR base_ref branches. Names match exactly; * matches zero or more characters, including slashes. Only valid for GitHub PR triggers. Omit for all target branches; channel and product scopes must also pass. Nonmatching events are skipped before launching a workflow or agent.
typeanyrequiredslugstringrequiredsubtitlestring | nullrequiredShow propertiesHide properties
stringnullInvalid request (validation failed).
codestringrequiredMachine-readable error code, e.g. NOT_FOUND.
dataanyOptional structured error details.
definedbooleanrequiredTrue if the error was declared in the procedure contract.
messagestringrequiredHuman-readable error message.
statusintegerrequiredHTTP status code.
Missing or invalid API key.
codestringrequiredMachine-readable error code, e.g. NOT_FOUND.
dataanyOptional structured error details.
definedbooleanrequiredTrue if the error was declared in the procedure contract.
messagestringrequiredHuman-readable error message.
statusintegerrequiredHTTP status code.
The API key does not have access to this resource.
codestringrequiredMachine-readable error code, e.g. NOT_FOUND.
dataanyOptional structured error details.
definedbooleanrequiredTrue if the error was declared in the procedure contract.
messagestringrequiredHuman-readable error message.
statusintegerrequiredHTTP status code.
The requested resource was not found.
codestringrequiredMachine-readable error code, e.g. NOT_FOUND.
dataanyOptional structured error details.
definedbooleanrequiredTrue if the error was declared in the procedure contract.
messagestringrequiredHuman-readable error message.
statusintegerrequiredHTTP status code.
Rate limit exceeded.
codestringrequiredMachine-readable error code, e.g. NOT_FOUND.
dataanyOptional structured error details.
definedbooleanrequiredTrue if the error was declared in the procedure contract.
messagestringrequiredHuman-readable error message.
statusintegerrequiredHTTP status code.
Internal server error.
codestringrequiredMachine-readable error code, e.g. NOT_FOUND.
dataanyOptional structured error details.
definedbooleanrequiredTrue if the error was declared in the procedure contract.
messagestringrequiredHuman-readable error message.
statusintegerrequiredHTTP status code.