Datacrazy Automações icon

Datacrazy Automações

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

Actions22

⚡ Buscar Mensagens (Avançado) → Buscar Mensagens (Avançado)

AI-generated

Summary

Fetch messages from a specified conversation with various filtering options across supported channels (WhatsApp, Instagram, UAZAPI) and format the output optionally for AI consumption.

Inputs

  • ID da Conversa (required) — Identifier of the conversation to fetch messages from, selected either from a searchable list or by direct ID input.
  • Canal (required) — The channel to filter messages from, options include general (all), WhatsApp API, Instagram API, or UAZAPI.
  • Limite (required) — Maximum number of messages to return.
  • Inverter Ordem (Mais Antigas Primeiro) (required) — If true, messages are returned in chronological order (oldest first); otherwise, newest first.
  • Filtrar por Direção — Enable filtering messages by their direction (received or sent).
  • Direção — Specifies if only received or only sent messages are returned. Only shown if filtering by direction is enabled.
  • Filtrar por Tipo — Enable filtering messages by message type.
  • Tipo de Mensagem — Specifies the message type to filter for, e.g., Text, Audio, Image, Video, File, External Link (Instagram), or vCard. Only shown if filtering by type is enabled.
  • Filtrar por Palavra-chave — Enable filtering messages containing a specific keyword.
  • Palavra-chave — Keyword used to filter messages. Only shown if filtering by keyword is enabled.
  • [WhatsApp] Filtrar por Encaminhadas — Filter WhatsApp messages that were forwarded.
  • Apenas Encaminhadas — If enabled, returns only forwarded WhatsApp messages; if disabled, returns only non-forwarded messages. Only shown if filtering by forwarded is enabled on WhatsApp channel.
  • [WhatsApp] Filtrar por Status — Filter WhatsApp messages by a specific message status.
  • Status da Mensagem — The WhatsApp message status to filter by, such as RECEIVED, READ, DELIVERED, SENT, or FAILED. Only shown if filtering by status is enabled on WhatsApp channel.
  • [WhatsApp] Filtrar por Tag do Contato — Filter WhatsApp messages by contact tags.
  • ID da Tag (WhatsApp) — The ID of the tag to filter contacts on WhatsApp channel. Select from list or enter directly. Only shown if filtering by contact tag is enabled on WhatsApp channel.
  • [WhatsApp] Filtrar por Etapa do Funil — Filter WhatsApp messages by the contact's sales funnel stage.
  • ID da Etapa (WhatsApp) — ID of the funnel stage to filter contacts by in WhatsApp channel.
  • [Instagram] Filtrar por Conta de Origem — Filter Instagram messages by specific Instagram account name.
  • Nome da Conta (Instagram) — The Instagram account name to filter messages for.
  • [Instagram] Filtrar por Links Externos — Filter Instagram messages by presence of external links or shared stories.
  • Apenas Com Links Externos — If enabled, returns only Instagram messages containing shared external links; if disabled, only normal messages.
  • [Instagram] Filtrar por Tag do Contato — Filter Instagram messages by contact tags.
  • ID da Tag (Instagram) — Tag ID to filter contacts on Instagram channel.
  • [UAZAPI] Filtrar por Mensagens Editadas — Filter UAZAPI messages by whether they have been edited.
  • Apenas Editadas — If enabled, returns only edited messages; if disabled, only unedited messages. Only shown if filtering by edited is enabled on UAZAPI channel.
  • [UAZAPI] Filtrar por Mensagens Internas — Filter UAZAPI messages to select internal team notes or messages.
  • Apenas Mensagens Internas — If enabled, returns only internal messages; if disabled, only non-internal messages.
  • [UAZAPI] Filtrar por Assinatura — Filter UAZAPI messages that have a specific signature.
  • Assinatura — The signature text to filter UAZAPI messages by.
  • [UAZAPI] Filtrar por Primeiro Contato — Filter UAZAPI messages that are the first message sent in a ticket.
  • Apenas Primeira Mensagem do Ticket — If enabled, returns only the first message of a ticket.
  • [UAZAPI] Filtrar por ID do Atendente — Filter UAZAPI messages by attendant ID.
  • Atendente — Select or enter the ID of the attendant to filter messages by in UAZAPI channel.
  • Formatar para IA (Texto Contínuo) — Format the returned messages into a continuous text field named 'aiContext' optimized for AI processing.
  • Nome do Cliente (Para Formatação IA) — Set client name used for AI formatting output (default 'Cliente').
  • Nome do Atendente (Para Formatação IA) — Set attendant name used for AI formatting output (default 'Atendente').

Output shape

A list of message records matching the specified conversation and filter criteria, optionally including a formatted AI context text field if requested.

Returns messages up to the specified limit after applying channel-specific and general filters. Messages are ordered chronologically if 'Inverter Ordem' is set to true, otherwise reverse chronological. Supports channel-specific filters for WhatsApp, Instagram, and UAZAPI. The AI formatting option adds a text field 'aiContext' consolidating messages into a continuous string for AI use.

Links

Discussion