Flowise Integration
Flowise is an open-source low-code platform for building customized LLM orchestration flows and AI agents. You can integrate Flowise with Evolution API to deploy visual AI workflows on WhatsApp.What is Flowise?
Flowise provides:- Drag-and-drop LLM workflow builder
- Support for multiple LLM providers (OpenAI, Anthropic, local models)
- Vector store integrations for RAG
- Agent capabilities with tools
- Memory and conversation management
- Custom chains and workflows
- API endpoints for each flow
Enable Flowise Integration
Add this environment variable to your.env file:
Configuration Settings
Create Default Settings
Before creating Flowise bots, configure default behavior settings for your instance.Settings Parameters
Session expiration time in seconds. Default: 300 (5 minutes)
Keyword to terminate the bot session. Example: “#EXIT”, “bye”
Delay in milliseconds between messages. Default: 1000
Message sent when bot encounters an error or cannot respond
Whether bot responds to messages sent by the instance owner
Whether instance owner can stop the bot session
Keep session open after completion. Default: false
Seconds to wait before processing rapid messages. Default: 10
List of JIDs (phone numbers) to ignore
Fallback Flowise bot ID to use when primary bot fails
Create a Flowise Bot
Create Flowise Flow
Design your AI workflow in Flowise using the visual builder. Deploy the flow and note the API endpoint.
Get API credentials
From Flowise, copy your chatflow API endpoint URL and API key (if authentication is enabled).
Request Parameters
Enable or disable this bot
Description of the bot purpose
Flowise chatflow prediction API endpoint (e.g., “https://flowise.yourdomain.com/api/v1/prediction/chatflow-id”)
Flowise API key for authentication (optional, only if you enabled API key auth in Flowise)
Trigger type: “all”, “keyword”, or “advanced”
For keyword triggers: “equals”, “contains”, “startsWith”, “endsWith”, “regex”
The keyword or regex pattern to trigger this bot
Trigger Types
All Messages
Respond to every message (only one “all” trigger allowed per instance):Keyword Trigger
Trigger based on specific keywords:equals- Exact matchcontains- Contains the keywordstartsWith- Message starts with keywordendsWith- Message ends with keywordregex- Regular expression match
Advanced Trigger
Use regex for complex pattern matching:Update Flowise Bot
Modify an existing Flowise bot configuration:Delete Flowise Bot
Remove a Flowise bot from your instance:Fetch Flowise Bots
Retrieve all Flowise bots configured for your instance:Session Management
Change Session Status
Update the status of an active Flowise session:Fetch Sessions
Get all active Flowise sessions:Flowise Workflow Examples
RAG Chatflow
Create a knowledge-base powered bot:- Add Document Loader (PDF, text, web scraping)
- Connect to Text Splitter
- Add Vector Store (Pinecone, Weaviate, etc.)
- Connect to Conversational Retrieval Chain
- Add Chat Model (OpenAI, Anthropic, etc.)
- Deploy and copy API endpoint
Agent with Tools
Build an autonomous agent:- Add Agent node (OpenAI Functions, ReAct)
- Connect tools (Calculator, Search, Custom API)
- Add Memory for context retention
- Configure LLM model
- Deploy and copy API endpoint
Custom Chain
Design complex workflows:- Add LLM Chain node
- Add prompt templates
- Connect multiple chains
- Add conditional logic
- Deploy and copy API endpoint
Use Cases
Knowledge Base Assistant
Knowledge Base Assistant
Deploy RAG-powered support:
- Answer questions from your documentation
- Provide accurate, sourced information
- Handle multi-turn conversations
- Update knowledge base without retraining
Multi-Step Workflows
Multi-Step Workflows
Build complex conversation flows:
- Data collection and validation
- Multi-stage processes
- Conditional branching
- Integration with multiple services
AI Agents with Tools
AI Agents with Tools
Create autonomous assistants:
- Web search and information retrieval
- API integrations and data fetching
- Calculations and data processing
- Multi-step reasoning and planning
Hybrid LLM Solutions
Hybrid LLM Solutions
Combine multiple AI providers:
- Use different models for different tasks
- Fallback between providers
- Cost optimization strategies
- Local model integration
Best Practices
Test your Flowise chatflows thoroughly in the Flowise UI before deploying to WhatsApp.
- Design modular flows: Break complex workflows into reusable components
- Handle errors gracefully: Add error handling nodes in your Flowise chains
- Optimize for WhatsApp: Keep responses concise and conversational
- Use memory appropriately: Configure conversation memory based on use case
- Monitor performance: Track latency and success rates in Flowise analytics
- Version your flows: Maintain different versions for testing and production
Troubleshooting
Bot not responding
Bot not responding
- Verify
FLOWISE_ENABLED=truein environment - Check that the bot is enabled (
enabled: true) - Ensure trigger conditions match the incoming message
- Verify Flowise API URL is correct and accessible
- Test the Flowise chatflow directly in Flowise UI
- Check Flowise logs for errors
Authentication errors
Authentication errors
- Verify API key is correct (if using authentication)
- Check that API key is properly configured in Flowise
- Ensure API key has necessary permissions
- Test API endpoint with curl or Postman
Slow response times
Slow response times
- Optimize your Flowise chatflow (reduce unnecessary nodes)
- Check vector store query performance
- Monitor LLM provider response times
- Consider using faster models for time-sensitive use cases
- Check network latency between Evolution API and Flowise
Context not maintained
Context not maintained
- Verify conversation memory is enabled in Flowise chatflow
- Increase
expiretime if sessions are timing out - Set
keepOpen: truefor longer conversations - Check that session IDs are being passed correctly
Unexpected responses
Unexpected responses
- Review chatflow logic in Flowise visual builder
- Check prompt templates for clarity
- Verify tool configurations and outputs
- Test with the same input in Flowise UI
- Review Flowise execution logs
Advanced Configuration
Multiple Chatflows
You can deploy multiple Flowise chatflows with different triggers:Self-Hosted Flowise
For self-hosted Flowise installations:Flowise Features in WhatsApp
Conversation Memory
Flowise automatically maintains conversation context:- Buffer memory for recent messages
- Summary memory for long conversations
- Entity memory for tracking information
Document Chat
Chat with uploaded documents:- PDF parsing and indexing
- Semantic search across documents
- Citation and source tracking
- Multi-document support
Agent Tools
Integrate external tools:- Web search (SerpAPI, Brave Search)
- Calculations and math
- Custom API calls
- Database queries