Skip to main content

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:
# Enable Flowise integration
FLOWISE_ENABLED=true

Configuration Settings

Create Default Settings

Before creating Flowise bots, configure default behavior settings for your instance.
curl -X POST https://your-api.com/flowise/settings/{instance} \
  -H "apikey: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "expire": 300,
    "keywordFinish": "#EXIT",
    "delayMessage": 1000,
    "unknownMessage": "I did not understand your message.",
    "listeningFromMe": false,
    "stopBotFromMe": false,
    "keepOpen": false,
    "debounceTime": 10,
    "ignoreJids": [],
    "flowiseIdFallback": ""
  }'

Settings Parameters

expire
number
required
Session expiration time in seconds. Default: 300 (5 minutes)
keywordFinish
string
required
Keyword to terminate the bot session. Example: “#EXIT”, “bye”
delayMessage
number
required
Delay in milliseconds between messages. Default: 1000
unknownMessage
string
required
Message sent when bot encounters an error or cannot respond
listeningFromMe
boolean
required
Whether bot responds to messages sent by the instance owner
stopBotFromMe
boolean
required
Whether instance owner can stop the bot session
keepOpen
boolean
required
Keep session open after completion. Default: false
debounceTime
number
required
Seconds to wait before processing rapid messages. Default: 10
ignoreJids
array
required
List of JIDs (phone numbers) to ignore
flowiseIdFallback
string
Fallback Flowise bot ID to use when primary bot fails

Create a Flowise Bot

1

Create Flowise Flow

Design your AI workflow in Flowise using the visual builder. Deploy the flow and note the API endpoint.
2

Get API credentials

From Flowise, copy your chatflow API endpoint URL and API key (if authentication is enabled).
3

Create bot in Evolution API

Register the Flowise chatflow with Evolution API.
4

Test the integration

Send a message matching your trigger to start a Flowise conversation.
curl -X POST https://your-api.com/flowise/create/{instance} \
  -H "apikey: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "description": "Customer Support Flow",
    "apiUrl": "https://flowise.yourdomain.com/api/v1/prediction/chatflow-id-here",
    "apiKey": "your-flowise-api-key",
    "triggerType": "keyword",
    "triggerOperator": "equals",
    "triggerValue": "support",
    "expire": 300,
    "keywordFinish": "#EXIT",
    "delayMessage": 1000,
    "unknownMessage": "Sorry, I encountered an error.",
    "listeningFromMe": false,
    "stopBotFromMe": false,
    "keepOpen": false,
    "debounceTime": 10
  }'

Request Parameters

enabled
boolean
required
Enable or disable this bot
description
string
required
Description of the bot purpose
apiUrl
string
required
Flowise chatflow prediction API endpoint (e.g., “https://flowise.yourdomain.com/api/v1/prediction/chatflow-id”)
apiKey
string
Flowise API key for authentication (optional, only if you enabled API key auth in Flowise)
triggerType
string
required
Trigger type: “all”, “keyword”, or “advanced”
triggerOperator
string
For keyword triggers: “equals”, “contains”, “startsWith”, “endsWith”, “regex”
triggerValue
string
The keyword or regex pattern to trigger this bot

Trigger Types

All Messages

Respond to every message (only one “all” trigger allowed per instance):
{
  "triggerType": "all"
}

Keyword Trigger

Trigger based on specific keywords:
{
  "triggerType": "keyword",
  "triggerOperator": "contains",
  "triggerValue": "help"
}
Available operators:
  • equals - Exact match
  • contains - Contains the keyword
  • startsWith - Message starts with keyword
  • endsWith - Message ends with keyword
  • regex - Regular expression match

Advanced Trigger

Use regex for complex pattern matching:
{
  "triggerType": "advanced",
  "triggerValue": "^(how|what|when)\\s"
}

Update Flowise Bot

Modify an existing Flowise bot configuration:
curl -X PUT https://your-api.com/flowise/update/{instance}/{botId} \
  -H "apikey: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "description": "Updated Support Flow",
    "triggerValue": "info"
  }'

Delete Flowise Bot

Remove a Flowise bot from your instance:
curl -X DELETE https://your-api.com/flowise/delete/{instance}/{botId} \
  -H "apikey: your-api-key"

Fetch Flowise Bots

Retrieve all Flowise bots configured for your instance:
curl -X GET https://your-api.com/flowise/fetch/{instance} \
  -H "apikey: your-api-key"

Session Management

Change Session Status

Update the status of an active Flowise session:
curl -X POST https://your-api.com/flowise/changeStatus/{instance} \
  -H "apikey: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "remoteJid": "[email protected]",
    "status": "closed"
  }'

Fetch Sessions

Get all active Flowise sessions:
curl -X GET https://your-api.com/flowise/fetchSessions/{instance} \
  -H "apikey: your-api-key"

Flowise Workflow Examples

RAG Chatflow

Create a knowledge-base powered bot:
  1. Add Document Loader (PDF, text, web scraping)
  2. Connect to Text Splitter
  3. Add Vector Store (Pinecone, Weaviate, etc.)
  4. Connect to Conversational Retrieval Chain
  5. Add Chat Model (OpenAI, Anthropic, etc.)
  6. Deploy and copy API endpoint

Agent with Tools

Build an autonomous agent:
  1. Add Agent node (OpenAI Functions, ReAct)
  2. Connect tools (Calculator, Search, Custom API)
  3. Add Memory for context retention
  4. Configure LLM model
  5. Deploy and copy API endpoint

Custom Chain

Design complex workflows:
  1. Add LLM Chain node
  2. Add prompt templates
  3. Connect multiple chains
  4. Add conditional logic
  5. Deploy and copy API endpoint

Use Cases

Deploy RAG-powered support:
  • Answer questions from your documentation
  • Provide accurate, sourced information
  • Handle multi-turn conversations
  • Update knowledge base without retraining
Build complex conversation flows:
  • Data collection and validation
  • Multi-stage processes
  • Conditional branching
  • Integration with multiple services
Create autonomous assistants:
  • Web search and information retrieval
  • API integrations and data fetching
  • Calculations and data processing
  • Multi-step reasoning and planning
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.
Secure your Flowise API endpoints with API keys, especially if they’re publicly accessible.
  • 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

  • Verify FLOWISE_ENABLED=true in 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
  • 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
  • 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
  • Verify conversation memory is enabled in Flowise chatflow
  • Increase expire time if sessions are timing out
  • Set keepOpen: true for longer conversations
  • Check that session IDs are being passed correctly
  • 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:
// Technical support chatflow
{
  apiUrl: 'https://flowise.example.com/api/v1/prediction/tech-support-id',
  triggerType: 'keyword',
  triggerValue: 'technical'
}

// Sales inquiry chatflow
{
  apiUrl: 'https://flowise.example.com/api/v1/prediction/sales-id',
  triggerType: 'keyword',
  triggerValue: 'buy'
}

// General assistant (fallback)
{
  apiUrl: 'https://flowise.example.com/api/v1/prediction/general-id',
  triggerType: 'all'
}

Self-Hosted Flowise

For self-hosted Flowise installations:
{
  "apiUrl": "http://localhost:3000/api/v1/prediction/your-chatflow-id",
  "apiKey": "your-api-key"
}
Ensure your Flowise instance is accessible from the Evolution API server.

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
  • Dify - Alternative LLM orchestration platform
  • OpenAI - Direct OpenAI integration
  • N8N - Workflow automation platform
  • EvoAI - Evolution AI platform

Build docs developers (and LLMs) love