Quick Start
Available Tools
n8n_workflow
Execute an n8n workflow and return the result.| Parameter | Type | Default | Description |
|---|---|---|---|
workflow_id | str | Required | The n8n workflow ID to execute |
input_data | dict | None | Input data to pass to the workflow |
n8n_url | str | http://localhost:5678 | n8n instance URL (or N8N_URL env var) |
api_key | str | None | n8n API key (or N8N_API_KEY env var) |
timeout | float | 60.0 | Request timeout in seconds |
wait_for_completion | bool | True | Wait for workflow to complete before returning |
n8n_list_workflows
List available n8n workflows.| Parameter | Type | Default | Description |
|---|---|---|---|
n8n_url | str | http://localhost:5678 | n8n instance URL (or N8N_URL env var) |
api_key | str | None | n8n API key (or N8N_API_KEY env var) |
Environment Variables
Configure n8n connection through environment variables:| Variable | Description | Default |
|---|---|---|
N8N_URL | n8n instance URL | http://localhost:5678 |
N8N_API_KEY | n8n API key for authentication | None (optional for local) |
Agent Examples
- Simple Automation Agent
- Data Processing Agent
- Multi-Platform Notifier
Workflow Integration Patterns
Communication Workflows
Communication Workflows
Common patterns for messaging and communication:
Data Integration Workflows
Data Integration Workflows
Patterns for data processing and storage:
API Integration Workflows
API Integration Workflows
Patterns for external API calls:
Error Handling
Handle workflow execution errors gracefully:- Basic Error Handling
- Agent Error Handling
- Retry Logic
Best Practices
Workflow Design
Workflow Design
Design n8n workflows for agent consumption:
- Single Purpose: Each workflow should do one thing well
- Clear Inputs: Define expected input data structure clearly
- Consistent Outputs: Return structured, predictable results
- Error Handling: Include error nodes to handle failures gracefully
Input Data Validation
Input Data Validation
Validate input data before passing to workflows:
Security Considerations
Security Considerations
Keep sensitive data secure:
- Store API keys and secrets in n8n credential storage, not workflow inputs
- Use environment variables for configuration
- Validate and sanitize user inputs
- Limit workflow execution permissions appropriately
Performance Optimization
Performance Optimization
Optimize workflow performance:
- Use
wait_for_completion=Falsefor fire-and-forget operations - Set appropriate timeouts based on workflow complexity
- Cache workflow lists when possible
- Monitor execution times and optimize slow workflows
Related
n8n Integration Overview
Complete guide to n8n integration architecture and setup
n8n API Reference
HTTP endpoints for n8n to invoke PraisonAI agents
Visual Workflow Editor
Export and edit PraisonAI workflows in n8n UI
CLI n8n Commands
Command-line tools for n8n workflow management

