connect_playbook_to_trigger
Make a playbook use a trigger: it gets the items the trigger finds that its filter says yes to. Saves on the playbook's working copy; it only takes effect when the playbook is published, and that needs the trigger published first. rule says in plain words which items it runs for; filter is a module with export function filter(record) (it must say export, or it fails on every item). try_playbook_filter can validate the filter first. Connecting again to the same trigger replaces the filter.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"triggerId": "<triggerId>",
"playbookId": "<playbookId>",
"rule": "<rule>",
"filter": "<filter>"
},
"name": "connect_playbook_to_trigger"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule | Yes | Which items it runs for, in plain words, e.g. "Runs for urgent open tickets". | |
| filter | Yes | A module with `export function filter(record)` returning true or false. It must say `export`. | |
| triggerId | Yes | The trigger's id, from list_triggers or create_trigger. | |
| playbookId | Yes | The playbook to connect, from list_playbooks. |