Actions7
Opt-in / Opt-out Handler
AI-generatedSummary
Detect opt-in and opt-out keywords in incoming messages to update the unsubscriber list for a specified communication channel, routing messages accordingly.
Inputs
- Message Object Field (required) — Dot-path in the input JSON where the WhatsApp (or other channel) inbound message object is found, e.g., 'whatsappInboundMessage'.
- Opt-out Keywords (required) — Comma-separated list of case-insensitive keywords that trigger unsubscribing (opt-out) from messages.
- Opt-in Keywords (required) — Comma-separated list of case-insensitive keywords that trigger subscribing (opt-in) to messages.
- Channel (required) — Communication channel to manage unsubscribes/subscribes for. Options: WhatsApp, SMS, Voice, Email, or All channels.
- Match Mode (required) — Whether to trigger on messages that contain the keywords or require an exact match of the whole message ('contains' or 'exact').
Output shape
Three separate output streams: 'Opted Out' for messages with opt-out keywords, 'Opted In' for opt-in keywords, and 'Other' for all other messages.
Each output contains items with original input data enriched with additional fields: '_phone' with sender's phone number, '_text' with the incoming message text, and '_optAction' set to 'opted_out' or 'opted_in' when applicable. The node silently handles API errors when updating the unsubscriber list and continues processing other items. The message object's 'from' field is used as the contact phone number.
