YCloud Sequences icon

YCloud Sequences

Pre-built WhatsApp automation sequences: contact upsert, inbound routing, opt-in/out, onboarding, message status routing, tag campaigns and auto-responses.

Inbound Message Router

AI-generated

Summary

Route inbound WhatsApp messages by their type (e.g., text, image, video) from the specified message object field in the input item and categorize them to corresponding outputs. Optionally detect specified keywords in text messages and add a "_keyword" label to the output item when matched.

Inputs

  • Message Object Field (required) — The field in the input item JSON object that contains the WhatsApp message object, typically from a YCloud Trigger node. Default is 'whatsappInboundMessage'.
  • Keyword Rules (Text Messages) — An optional list of keyword rules, each consisting of a case-insensitive partial match keyword and an associated label. When a text message contains a keyword, the label is added to the output item's '_keyword' field.

Output shape

Ten outputs representing message types: Text, Image, Video, Audio, Document, Location, Interactive, Sticker, Reaction, and Other.

Each output array contains the input items enriched with any '_keyword' label if keyword rules matched. Items are routed to the output matching their message type; messages with unrecognized types are routed to the 'Other' output.

Examples

Example 1: Route inbound WhatsApp messages and label those containing defined keywords.

Set 'Message Object Field' to the field containing the inbound message (e.g., 'whatsappInboundMessage'), and add keyword rules like {"keyword":"hello", "label":"greeting"} to tag matching text messages.

Links

Discussion