Datacrazy Automações icon

Datacrazy Automações

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

Actions22

⚡ É Mensagem Referenciada?

AI-generated

Summary

Determine whether a message is a reply (referenced message) based on a context identifier from either a direct input or by auto-detecting the relevant field within a complete webhook payload from supported providers.

Inputs

  • Modo de Verificação (required) — Choose verification mode: 'Campo Direto (Context ID)' to provide the context_id value directly, or 'Payload Completo (Auto-detectar)' to provide the entire webhook JSON payload for automatic detection.
  • Context ID — Provide the context_id value directly when using 'Campo Direto' mode. Used to identify if the message references another message. If empty, the output is "Não"; if filled, the output is "Sim".
  • Payload do Webhook (JSON) — Provide the complete JSON payload of the webhook received when using 'Payload Completo' mode. The node detects the appropriate reply context field based on the provider selected.
  • Provedor — Select the message provider in 'Payload Completo' mode to guide reply detection: automatic detection, WhatsApp Cloud API, Instagram API, or UAZAP.

Output shape

Two output branches representing a boolean result per item: index 0 outputs items marked "Sim" (yes, is a referenced reply message), and index 1 outputs items marked "Não" (no, not a reply).

The node splits output items into two streams based on whether the message is a reply. The detection criteria are based on presence of a context-identifying field, either directly provided or autodetected from known provider fields (context_id, message_reply_to_mid, quoted). For 'Campo Direto' mode, an empty context_id results in the "Não" output.

Links

Discussion