Datacrazy Automações icon

Datacrazy Automações

Utilitários de automação para fluxos com o Datacrazy CRM

Actions22

⚡ Switch Tipo de Mensagem

AI-generated

Summary

Switches and routes the message flow based on the message type, configured either manually or automatically from a raw webhook payload.

Inputs

  • switchMode (required) — Selects mode for determining the message type: 'Manual' requires you to provide the type explicitly, 'Auto (Webhook)' detects type and provider automatically from the webhook payload.
  • typeMessage (required) — When in Manual mode, specify the exact message type used for routing; accepted values are: text, image, video, audio, document/file.
  • provider — When in Auto mode, optionally specify the message provider for type detection; options include automatic detection, WhatsApp Cloud API, Instagram API, or UAZAP.
  • webhookPayload (required) — Complete raw JSON payload received from the webhook, used in Auto mode to detect the message type and provider.

Output shape

Multiple outputs representing distinct message types: text, image, video, audio, document/file, and a fallback for others.

The node outputs the incoming item to a single output corresponding to the detected message type. Selection between manual and automatic mode changes how the type is determined. In manual mode, the configured 'typeMessage' decides routing. In auto mode, the node parses the 'webhookPayload' using the chosen 'provider' to identify the type. This enables workflow branching based on the message format and source provider.

Links

Discussion