Evolution API icon

Evolution API

Interact with Evolution API

Overview

The node named "Evolution API" provides integration with the Evolution API service, allowing users to perform various operations related to the "Integration" resource, specifically the "Dify" operation. This node enables managing Dify bots by creating, finding, updating, deleting them, as well as fetching and changing session statuses.

Common scenarios where this node is beneficial include automating chatbot management workflows, such as:

  • Creating a new Dify bot instance with specific triggers and behaviors.
  • Querying existing Dify bots or sessions for monitoring or reporting.
  • Updating bot configurations dynamically based on external events.
  • Managing session states (open, paused, closed) to control bot availability.

Practical examples:

  • Automatically create a Dify bot when a new customer support channel is added.
  • Pause or close a bot session after business hours.
  • Fetch active sessions to analyze user interactions.

Properties

Name Meaning
Instance Name The name of the Dify bot instance that will send messages.
What Do You Want To Do Operation to perform with the Dify integration: Add Dify, Check Dify, Update Dify, Delete Dify, Fetch Session In Dify, Change Session Status In Dify.
Dify ID Identifier of the Dify bot to search for or modify; leave empty to search all (used in find, update, delete, fetch sessions, change status operations).
Dify URL The base URL of your Dify API endpoint (required for create and update operations).
Dify ApiKey API key credential for authenticating with the Dify bot API (required for create and update operations).
Trigger Type Type of trigger to activate the bot: Keyword or All messages (for create and update operations).
Trigger Operator Condition operator for the keyword trigger: Contains, Equals, Starts With, Ends With, Regex (only applicable if Trigger Type is Keyword).
Trigger The word, phrase, or regex pattern used as a trigger to start the Dify bot (required if Trigger Type is Keyword).
Expires In (Minutes) Duration in minutes without responses after which the bot should be deactivated (create and update operations).
Finish Keyword Word or phrase used to close the bot session (default "#exit", required for create and update operations).
Default Message Delay (In Milliseconds) Delay time in milliseconds before the bot sends a message (create and update operations).
Unknown Message Message sent when the bot receives an unrecognized input (create and update operations).
Listen To Messages Sent By Me Boolean flag indicating whether the bot listens to messages sent by the user themselves (create and update operations).
Pause The Bot When I Send A Message Boolean flag to pause the bot automatically when the user sends a message (create and update operations).
Keep The Bot Session Open Boolean flag to keep the bot session open indefinitely (create and update operations).
Wait Time (In Seconds) Time in seconds the bot waits to merge multiple incoming messages into one (create and update operations).
Recipient Number RemoteJid identifier of the recipient whose session status is to be changed (required for changeStatusDify operation).
Status Desired session status: Opened, Paused, or Closed (changeStatusDify operation).

Output

The node outputs JSON data representing the result of the performed operation. The structure depends on the chosen operation but generally includes details about the Dify bot or session objects, such as IDs, statuses, configuration parameters, and any response messages from the API.

If binary data were involved, it would typically represent files or media related to the bot sessions, but this node appears focused on JSON-based API interactions only.

Dependencies

  • Requires access to the Evolution API service.
  • Needs an API key credential for authenticating requests to the Dify bot API.
  • The user must provide the correct Dify API URL endpoint.
  • No additional external libraries beyond n8n's standard workflow dependencies are indicated.

Troubleshooting

  • Unsupported operation error: If the selected operation is not implemented, the node throws an error stating the function is unsupported. Ensure the operation name matches one of the supported options.
  • Missing required parameters: Operations like create or update require fields such as apiUrl, apiKeyBot, and trigger settings. Omitting these will cause errors.
  • Authentication failures: Incorrect or expired API keys will prevent successful API calls. Verify credentials.
  • Invalid Dify ID: For operations requiring a Dify ID, providing an incorrect or non-existent ID will result in no data found or failure.
  • Network issues: Connectivity problems to the Dify API URL will cause request failures.
  • Session status changes: Changing session status requires valid remoteJid and status values; invalid inputs may cause errors.

To resolve errors, verify all required inputs, ensure API credentials are valid, and confirm network connectivity to the specified API URL.

Links and References

Discussion