Aysali API icon

Aysali API

Interact with Aysali API

Integration → Dify

AI-generated

Summary

Create a Dify bot integration within n8n workflows, supporting bot creation, session management, status control, and trigger-based messaging.

Inputs

  • resourceForDifyBot — Choose an action for the Dify integration
  • apiUrl (required) — Enter your Dify URL
  • apiKeyBot (required) — Enter your Dify bot API key
  • difyBotId — Enter the Dify ID to fetch, leave empty to list all
  • triggerType — Choose an action for the Dify integration
  • triggerOperator — Choose an action for the Dify integration
  • triggerValue (required) — Word, phrase, or regex used as the trigger to start Dify
  • expire (required) — Minutes without replies before the bot is disabled
  • keywordFinish (required) — Word or phrase used to close the bot
  • delayMessage (required) — Bot message delay in milliseconds
  • unknownMessage (required) — Word or phrase used to close the bot
  • listeningFromMe — Whether the bot listens to messages sent by the user
  • stopBotFromMe — Whether the bot pauses when the user sends a message
  • keepOpen — Whether to keep the bot session open
  • debounceTime (required) — How long the bot waits for further messages after receiving one before merging them into a single message
  • remoteJid (required) — Recipient remote JID
  • status — Choose the session status

Output shape

Depends on selected action: createDify returns created bot details; findDify returns fetched Dify resources; updateDify returns updated resource; deleteDify returns deletion confirmation; fetchSessionsDify returns session lists; changeStatusDify returns updated session status.

Session and message data from the Dify integration, returned as workflow execution output depending on the selected action.

Examples

Example 1: Create a new Dify bot with keyword trigger '#sair' to close

Set resourceForDifyBot to 'createDify', provide apiUrl and apiKeyBot, set triggerType to 'keyword', triggerOperator to 'contains', triggerValue to a trigger phrase, expire to desired minutes, keywordFinish to '#sair', delayMessage and unknownMessage as needed.

Links

Discussion