light-heart-labs--ods
Langflow Workflows
This directory contains n8n workflow templates for integrating Langflow with ODS.
Available Workflows
Flow API (flow-api.json)
Expose Langflow flows via webhook with optional API key authentication.
Flow:
- Webhook: Receives POST requests at
/langflow-run - Validation: Validates API key and extracts flowId
- Langflow API: Calls Langflow run endpoint
- Response: Returns generated text and session info
Environment Variables:
| Variable | Description | Default |
|---|---|---|
LANGFLOW_HOST |
Langflow hostname | langflow |
LANGFLOW_PORT |
Langflow port | 7860 |
LANGFLOW_API_KEY |
Optional webhook API key | (none) |
LANGFLOW_DEFAULT_FLOW_ID |
Default flow if not provided | (none) |
Usage:
# With specific flow
curl -X POST http://localhost:5678/webhook/langflow-run \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"flowId": "your-flow-id",
"input": "Generate a marketing email"
}'
# With default flow (set LANGFLOW_DEFAULT_FLOW_ID)
curl -X POST http://localhost:5678/webhook/langflow-run \
-H "Content-Type: application/json" \
-d '{
"input": "Summarize this article"
}'
Response:
{
"text": "Here's your marketing email...",
"session_id": "uuid",
"outputs": [
{"component": "ChatInput-abc123", "type": "chat"}
]
}
Setup
- Import workflow into n8n
- Configure environment variables
- Create a flow in Langflow UI
- Copy the flow ID from the URL
- Test via webhook
Integration with ODS
Connect Langflow to ODS's LLM:
- In Langflow, add an "Ollama" or "OpenAI" component
- Set Base URL:
http://llama-server:8000/v1 - Use local models already downloaded
Langflow vs Flowise
| Feature | Langflow | Flowise |
|---|---|---|
| Framework | LangChain | LangChain / custom |
| Components | LangChain native | Pre-built nodes |
| Custom Code | Python components | JavaScript functions |
| API | Simpler | More flexible |
Choose Langflow for LangChain-native workflows. Choose Flowise for more pre-built integrations.