Actions138
- API Key Actions
- Automation Rule Actions
- Call Actions
- Catalog Actions
- Channel Actions
- Chat Actions
- Contact Actions
- Group Actions
- Label Actions
- Media Actions
- Message Actions
- Observability Actions
- Presence Actions
- Profile Actions
- Session Actions
- Status Actions
- System Actions
- Template Actions
- Webhook Actions
Automation Rule → Update
AI-generatedSummary
Update an automation rule (autoreply rule) for a given OpenWA session. The rule is identified by the Rule ID (obtained from Create or List). The update is partial: only the fields you specify in the Update Fields collection are sent; omitted fields retain their current value. Updatable fields: Conditions (JSON match conditions, same shape as webhook filters; to reset to match everything, set to {"conditions": []}; leave blank to keep current conditions; note: sending an empty object {} is refused), Cooldown (Seconds, 0-86400, default 60), Enabled (boolean, default true), Name (string, up to 100 characters; must be non-empty to change), Reply Text (string; must be non-empty to change). Note: Rules run on the gateway, so they respond even when the n8n workflow is not running — suitable for out-of-hours acknowledgements but not for workflow logic. Conditions only see message events.
Inputs
- Session Name or ID (required) — The ID of the session. Choose from the list, or specify an ID using an expression.
- Rule ID (required) — The ID of the rule, as returned by Create or List
- Conditions — Match conditions as JSON, in the same shape as webhook filters. Leaving this blank keeps the rule's stored conditions unchanged. To make the rule answer everything again, send {"conditions":[]}; an empty object on its own is refused.
- Cooldown (Seconds) — How long the rule stays quiet in a chat after replying there. Default: 60. Range: 0-86400.
- Enabled — Whether the rule is active. Default: true.
- Name — Display name for the rule, up to 100 characters. Must be non-empty to change.
- Reply Text — What the gateway sends back when the rule matches. Must be non-empty to change.
Output shape
The updated automation rule object as returned by the OpenWA gateway, or an error if the update fails.
The operation does not return the full rule by default; n8n returns the raw gateway response. Check the node's error handling for failure details.
Examples
Example 1: Update an existing rule to change its reply text and cooldown
Session Name or ID: 'my-session', Rule ID: 'rule-123', Update Fields: Reply Text: 'Thanks for your message!', Cooldown (Seconds): 30
Example 2: Disable a rule without changing other fields
Session Name or ID: 'my-session', Rule ID: 'rule-456', Update Fields: Enabled: false