WAdmin Trigger icon

WAdmin Trigger

Gatilho que dispara fluxos ao receber mensagens do 1ClickAi WAdmin

Overview

This node acts as a webhook trigger designed to start workflows when receiving messages from the 1ClickAi WAdmin service. It listens for incoming HTTP POST requests at a configurable webhook path and validates the request using a Bearer token authentication. Upon receiving valid data, it categorizes the message by type (audio, text, or image) and source (group or private message), then routes the data to one of six outputs accordingly.

Common scenarios where this node is beneficial include automating responses or processing messages received via the 1ClickAi WAdmin platform, such as handling group or private chat messages with different content types. For example, you could use this node to trigger workflows that analyze audio messages in group chats or process images sent privately.

Properties

Name Meaning
Path The final part of the webhook URL path. This must be unique per workflow to avoid conflicts. Default is "oneclickai-wadmin".

Output

The node has six distinct outputs, each corresponding to a combination of message source and type:

Output Name Description
gp-audio Group chat audio messages
gp-texto Group chat text messages
gp-imagem Group chat image messages
pm-audio Private message audio messages
pm-texto Private message text messages
pm-imagem Private message image messages

Each output emits an array of items containing a json object with the original message data plus a normalized tipo field indicating the combined type (e.g., "gp-audio"). The node returns an HTTP response confirming success or describing errors.

If the incoming request is empty (used as a test), the node responds with a success message but does not emit any data.

Dependencies

  • Requires an API key credential for authenticating incoming webhook requests via a Bearer token.
  • The node expects the 1ClickAi WAdmin service to send JSON payloads with specific fields (usuario, mensagem, tipo, and grupo).
  • No additional external dependencies are required beyond the configured API key credential.

Troubleshooting

  • Missing or invalid API token: If the Bearer token is missing or incorrect, the node responds with HTTP 401 or 403 errors respectively. Ensure the correct token is set in the credentials and that the webhook sender includes it properly.
  • Invalid JSON body: If the request body is not valid JSON or missing required fields (usuario, mensagem, tipo, grupo), the node returns HTTP 400 with an error message. Verify the webhook sender sends correctly formatted JSON with all required fields.
  • Unsupported message type: If the combination of message source and type is not recognized, the node returns HTTP 400 indicating the unsupported type. Confirm that the tipo and grupo values conform to expected values.
  • Duplicate webhook paths: Since the webhook path must be unique per workflow, conflicts may cause unexpected behavior. Use unique paths for each instance.

Links and References

Discussion