Evolution API icon

Evolution API

Interact with Evolution API

Overview

This n8n node enables integration with the Dify bot through the "Integração" resource and the "Dify" operation. It allows users to manage Dify bot instances, including creating, updating, deleting, fetching sessions, and changing session statuses. This is particularly useful for automating workflows that require interaction with Dify bots, such as customer support automation, chatbot management, or session monitoring.

Practical examples:

  • Automatically create a new Dify bot instance when onboarding a new client.
  • Update trigger keywords or session settings for an existing Dify bot.
  • Fetch all active sessions for reporting or analytics.
  • Change the status of a bot session (e.g., pause or close) based on workflow logic.

Properties

Below are the supported input properties for the "Integração" resource and "Dify" operation:

Display Name Type Meaning / Description
Nome Da Instancia string The name of the Dify instance to send the message from. Required for most actions.
O Que Deseja Fazer options Select the action to perform with the Dify integration (Add, Check, Update, Delete, Fetch Sessions, Change Status).
ID Do Dify string The ID of the Dify bot to target. Leave empty to fetch all. Used in find, update, delete, fetch sessions, change status.
Url Do Dify string The URL of your Dify instance. Required for creating or updating a bot.
ApiKey Do Dify string The API key for your Dify bot. Required for creating or updating a bot.
Tipo De Gatilho options Trigger type: keyword or all. Used when creating or updating a bot.
Operador Do Gatilho options Trigger operator: contains, equals, startsWith, endsWith, regex. Used with keyword trigger type.
Gatilho string The word/phrase or regex used as a trigger to start the Dify bot. Required with keyword trigger type.
Expira Em (Minutos) number Minutes of inactivity before the bot is deactivated. Required for create/update.
Palavra Chave De Finalização string Word/phrase used to close the bot. Required for create/update.
Delay Padrão Da Mensagem (Em Milésimos) number Default message delay in milliseconds. Required for create/update.
Palavra Chave De Finalização string Message shown when input is not recognized. Required for create/update.
Escuta Mensagens Enviadas Por Mim boolean Whether the bot listens to messages sent by you. Used in create/update.
Pausa O Bot Quando Eu Enviar Uma Mensagem boolean Whether the bot pauses when you send a message. Used in create/update.
Mantem a Sessão Do Bot Aberta boolean Whether to keep the bot session open. Used in create/update.
Tempo De Espera (Em Segundos) number Time to wait after receiving a message before grouping further messages. Required for create/update.
Numero Do Destinatario string Recipient's remoteJid. Required for changing session status.
Status options Session status: opened, paused, closed. Used when changing session status.

Output

The output will be a JSON array containing the result(s) of the selected Dify operation. The structure of each item in the array depends on the specific action performed, but typically includes fields relevant to the Dify bot instance or session, such as IDs, status, configuration details, or confirmation messages.

Example output (for a successful operation):

[
  {
    "id": "dify-bot-id",
    "name": "Nome Da Instancia",
    "status": "opened",
    "message": "Bot created successfully"
  }
]

Note: The actual fields may vary depending on the operation chosen.

If the node outputs binary data, it will represent files or attachments related to the Dify bot, but this is uncommon for these operations.

Dependencies

  • External Service: Requires access to a Dify bot instance via its API.
  • API Key: You must provide a valid Dify API key for authentication when creating or updating a bot.
  • n8n Credentials: The node expects credentials named evolutionApi to be configured in n8n.

Troubleshooting

Common issues:

  • Missing or invalid API key: Ensure the "ApiKey Do Dify" property is set correctly.
  • Incorrect Dify URL: Double-check the "Url Do Dify" value.
  • Required fields missing: Some operations require specific fields (e.g., "Nome Da Instancia", "Gatilho"). Make sure all required properties are filled.
  • Unsupported operation: If you select an unsupported combination of resource and operation, you may see an error like:
    • "Operação não suportada."
      Resolution: Verify that the selected operation is available for the chosen resource.

Error messages:

  • "A função \"<operation>\" para o recurso \"<resource>\" não é suportada!"
    Resolution: Check if the operation is implemented for the selected resource.

Links and References

Discussion