WhatsApp - Router icon

WhatsApp - Router

Filtra mensagens do WhatsApp e roteia automaticamente para saídas diferentes baseado no tipo

WhatsApp - Router

AI-generated

Overview

This node filters and routes WhatsApp messages automatically based on their type, such as text, image, audio, video, document, or others. It is useful for workflows that need to handle different message types separately, for example, processing images differently from text messages or ignoring group messages. It also includes options to prevent message loops by ignoring messages sent by the bot itself and to filter out messages sent by the user.

Use Case Examples

  1. A customer support workflow that routes incoming WhatsApp messages to different processing paths depending on whether they contain text, images, or documents.
  2. A monitoring system that ignores group messages and messages sent by the bot to avoid infinite loops.
  3. A personal assistant bot that only processes received messages and ignores those sent by the user.

Properties

Name Meaning
Filtrar Grupos If enabled, blocks messages from groups; if disabled, allows group messages.
Anti-Loop (Filtrar Próprias Mensagens) If enabled, ignores messages sent by the bot itself (fromMe=true) to prevent loops. Recommended to always keep enabled.
Apenas Mensagens Recebidas If enabled, ignores messages sent by you; if disabled, processes all messages.

Output

JSON

  • 0 - Text messages output array
  • 1 - Image messages output array
  • 2 - Audio messages output array
  • 3 - Video messages output array
  • 4 - Document messages output array
  • 5 - Other types of messages output array

Troubleshooting

  • If messages sent by the bot are not being filtered out, ensure the 'Anti-Loop' property is enabled to prevent loops.
  • If group messages are not being filtered as expected, check the 'Filtrar Grupos' property setting.
  • If messages sent by the user are still processed despite enabling 'Apenas Mensagens Recebidas', verify the property is correctly set to true.

Discussion