mirror of
https://github.com/thecyberlearn/quantum-ai-v3.git
synced 2026-08-18 13:12:57 +00:00
- Add N8N workflow directory structure for webhook-based agents - Create workflow management scripts (import/export/sync/backup) - Add comprehensive documentation for each agent's workflow setup - Clarify N8N deployment architecture (separate hosting from Django) - Update deployment guides with clear separation warnings - Add workflow deployment automation scripts Architecture clarification: - Django app deploys to Railway - N8N runs separately (N8N Cloud, separate Railway project, or self-hosted) - Communication via HTTP webhook URLs only 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| README.md | ||
| Social_Ads.json | ||
Social Ads Generator Agent - N8N Workflow
Overview
This directory contains the N8N workflow configuration for the Social Ads Generator Agent, which creates compelling social media advertisements for various platforms.
Workflow Files
workflow.json- Production workflow for N8N importworkflow_dev.json- Development/testing version (optional)workflow_backup.json- Backup version for disaster recovery
Webhook Configuration
- Webhook URL: Configured via
N8N_WEBHOOK_SOCIAL_ADSenvironment variable - HTTP Method: POST
- Expected Data Format:
{ "platform": "facebook", "product": "AI Marketing Tool", "audience": "small business owners", "tone": "professional", "features": ["automation", "analytics", "ROI tracking"], "requirements": "Include call-to-action" }
Setup Instructions
1. Import Workflow to N8N
- Open your N8N instance
- Click "Import from File" or "Import from URL"
- Upload the
workflow.jsonfile - Configure credentials (OpenAI API key, etc.)
- Activate the workflow
2. Configure Webhook URL
- Copy the webhook URL from N8N
- Set environment variable:
N8N_WEBHOOK_SOCIAL_ADS=https://your-n8n.com/webhook/social-ads - Restart your Django application
3. Test the Workflow
# Test via Django application
python manage.py test_webhook social_ads_generator
# Or test directly via curl
curl -X POST https://your-n8n.com/webhook/social-ads \
-H "Content-Type: application/json" \
-d '{"platform":"instagram","product":"Coffee Shop","audience":"coffee lovers","tone":"casual"}'
Workflow Components
- Webhook Node: Receives requests from Django application
- AI Processing: Uses OpenAI GPT-4 for ad content generation
- Platform Optimization: Tailors content for specific social media platforms
- Response Node: Returns structured ad content
- Error Handling: Manages failures and content generation issues
Expected Response Format
{
"success": true,
"ad_content": {
"headline": "Transform Your Business with AI",
"body": "Discover how AI can revolutionize your marketing...",
"call_to_action": "Start Free Trial",
"hashtags": ["#AI", "#Marketing", "#Business"],
"image_suggestions": ["professional team", "modern office"],
"target_audience": "business professionals aged 25-45"
},
"platform_specs": {
"character_limit": 280,
"recommended_format": "image_post"
}
}
Supported Platforms
- Facebook/Meta
- Twitter/X
- Google Ads
- TikTok
Troubleshooting
- Content not platform-optimized: Check platform parameter is correct
- Generic content: Provide more specific product/audience details
- API rate limits: Monitor OpenAI usage and implement queuing
- Webhook timeouts: Optimize prompts for faster generation
Best Practices
- Provide detailed product descriptions for better results
- Specify target audience demographics clearly
- Test generated content before publishing
- A/B test different tone variations
- Monitor ad performance and adjust prompts accordingly