A Python-based workflow automation engine that provides N8N-like functionality for free. Perfect for automating tasks, creating AI workflows, and building YouTube automation pipelines.
- β Free and Open Source - No licensing fees
- β Multiple Node Types - HTTP, AI (OpenRouter/OpenAI), Transform, Conditions, Triggers, YouTube, Database, Image, Voiceover
- β Async Execution - Fast, non-blocking workflow execution
- β Easy Configuration - Simple JSON-based workflow definitions
- β API Key Management - Secure credential handling
- β Extensible - Easy to add custom node types
- β YouTube Automation - Complete workflows for AI faceless channels
- Python 3.8+
aiohttplibrary
git clone https://github.com/simplifaisoul/workflow-engine.git
cd workflow-enginepip install aiohttpOr install from requirements:
pip install -r requirements.txtCreate workflow_config.json:
{
"api_keys": {
"openrouter": "your-openrouter-api-key-here",
"openai": "your-openai-api-key-here",
"github": "your-github-token-here"
}
}Or set environment variables:
# Windows PowerShell
$env:OPENROUTER_API_KEY="your-key-here"
# Linux/Mac
export OPENROUTER_API_KEY="your-key-here"python workflow_engine/quick_test.pyThis tests basic workflow execution without needing any API keys!
Create a file my_workflow.json:
{
"name": "My First Workflow",
"nodes": [
{
"id": "trigger_1",
"name": "Start",
"type": "trigger",
"parameters": {
"trigger_type": "manual"
}
},
{
"id": "ai_1",
"name": "AI Processing",
"type": "ai",
"parameters": {
"provider": "openrouter",
"model": "openai/gpt-3.5-turbo",
"prompt": "Say hello in one sentence"
}
}
],
"connections": {
"trigger_1": ["ai_1"]
}
}# Load workflow
python -m workflow_engine.main load --workflow-id my_workflow --file my_workflow.json
# Run workflow
python -m workflow_engine.main run --workflow-id my_workflow- Full Setup Guide - Complete setup instructions
- YouTube Automation Guide - Automate AI faceless YouTube channels
- Testing Guide - How to test the engine
- Run Tests - Detailed testing instructions
- Workflow Engine README - Detailed API documentation
- HTTP requests
- Data transformation
- Conditional logic
- Database operations
- Script generation
- Content creation
- Text processing
- Image descriptions
- Find viral videos
- Generate 3-act story scripts
- Create b-roll images
- Generate voiceovers
- Render videos
See workflow_engine/examples/youtube_automation/ for complete YouTube automation workflows.
- None required! Basic workflows work without any API keys.
- OpenRouter API Key (Recommended)
- Get from: https://openrouter.ai/keys
- Cost: Pay-per-use (~$0.01-0.05 per request)
- Set as:
OPENROUTER_API_KEY
- OpenRouter API Key (Required for script generation)
- YouTube Data API Key (Optional, for fetching video data)
- ElevenLabs API Key (Optional, free TTS available)
- Image Generation API (Optional, free options available)
See YOUTUBE_AUTOMATION_SETUP.md for complete setup.
{
"name": "Simple AI Workflow",
"nodes": [
{
"id": "trigger_1",
"type": "trigger",
"parameters": {"trigger_type": "manual"}
},
{
"id": "ai_1",
"type": "ai",
"parameters": {
"provider": "openrouter",
"model": "openai/gpt-3.5-turbo",
"prompt": "Summarize: {{$json.text}}"
}
}
],
"connections": {
"trigger_1": ["ai_1"]
}
}{
"name": "HTTP to AI",
"nodes": [
{
"id": "trigger_1",
"type": "trigger",
"parameters": {"trigger_type": "manual"}
},
{
"id": "http_1",
"type": "http",
"parameters": {
"method": "GET",
"url": "https://api.github.com/repos/microsoft/vscode"
}
},
{
"id": "ai_1",
"type": "ai",
"parameters": {
"provider": "openrouter",
"model": "openai/gpt-3.5-turbo",
"prompt": "Analyze this data: {{$json}}"
}
}
],
"connections": {
"trigger_1": ["http_1"],
"http_1": ["ai_1"]
}
}More examples in workflow_engine/examples/
python workflow_engine/quick_test.pypython workflow_engine/validate_setup.py$env:OPENROUTER_API_KEY="your-key"
python workflow_engine/test_workflow.pyworkflow_engine/
βββ __init__.py
βββ workflow_engine.py # Core engine
βββ config.py # Configuration management
βββ main.py # CLI interface
βββ nodes/ # Node implementations
β βββ base_node.py
β βββ http_node.py
β βββ ai_node.py
β βββ transform_node.py
β βββ trigger_node.py
β βββ condition_node.py
β βββ youtube_node.py
β βββ database_node.py
β βββ image_node.py
β βββ voiceover_node.py
βββ examples/ # Example workflows
βββ simple_workflow.json
βββ http_to_ai_workflow.json
βββ youtube_automation/
βββ find_viral_videos.json
βββ generate_script.json
βββ generate_images.json
βββ generate_voiceover.json
βββ main_orchestrator.json
| Node Type | Description | API Key Required? |
|---|---|---|
trigger |
Workflow entry points | β No |
http |
Make HTTP requests | β No |
ai |
AI API interactions (OpenRouter/OpenAI) | β Yes |
transform |
Data manipulation | β No |
condition |
Conditional logic | β No |
youtube |
YouTube operations | β No |
database |
File-based database | β No |
image |
Image generation | β Optional |
voiceover |
Text-to-speech | β Optional |
import asyncio
from workflow_engine.workflow_engine import WorkflowEngine
from workflow_engine.config import WorkflowConfigManager
async def main():
# Initialize
config = WorkflowConfigManager()
engine = WorkflowEngine(config)
# Load workflow
engine.load_workflow_from_file("my_workflow", "my_workflow.json")
# Run workflow
execution_id = await engine.execute_workflow("my_workflow", {"text": "Hello"})
# Check status
await asyncio.sleep(2)
status = engine.get_execution_status(execution_id)
print(status)
asyncio.run(main())Add custom node types:
from workflow_engine.nodes.base_node import BaseNode
class MyCustomNode(BaseNode):
async def execute(self, input_data):
# Your custom logic here
return {"result": "custom"}Register it:
engine.register_node_type("custom", MyCustomNode)Per video cost:
- Script Generation: $0.01-0.05 (OpenRouter)
- Images: $0.00 (free APIs)
- Voiceover: $0.00 (free TTS)
- Video Rendering: $0.00 (FFmpeg local)
- Total: $0.01-0.05 per video
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use this project for any purpose.
- Check the documentation
- Review example workflows
- See troubleshooting guide
| Feature | N8N | This Engine |
|---|---|---|
| Cost | Paid/Enterprise | Free |
| Open Source | Partial | Yes |
| Self-Hosted | Yes | Yes |
| Python-based | No | Yes |
| Extensible | Yes | Yes |
| API Integration | Yes | Yes |
| AI Integration | Yes | Yes |
- Install Python 3.8+
- Install dependencies:
pip install aiohttp - Run quick test:
python workflow_engine/quick_test.py - (Optional) Get OpenRouter API key
- (Optional) Create
workflow_config.json - Load example workflow
- Run your first workflow!
Ready to automate! π Start with the quick test to verify everything works, then build your own workflows!