Marketing Campaign Pipeline
Defines a four-stage marketing pipeline with agent handoffs, data contracts, error handling, and activation commands.
What this file does
Defines a four-stage marketing pipeline with agent handoffs, data contracts, error handling, and activation commands.
When to use it
- Building an automated campaign creation workflow
- Designing multi-agent handoffs with typed data contracts
- Adding error recovery paths to agent pipelines
- Integrating n8n or Claude Code for campaign orchestration
Assumes this stack
Marketing Campaign Pipeline
Purpose: End-to-end campaign creation from research to performance analysis.
Pipeline Diagram
graph TD
A[trend-researcher] -->|research_complete| B[content-creator]
B -->|content_ready| C[social-media-strategist]
C -->|campaign_launched| D[analytics-reporter]
A -->|trend_not_found| E[extend_research]
C -->|creative_rejected| F[brand-guardian]
Data Contracts
Stage 1 → Stage 2 Handoff
{
"from_agent": "trend-researcher",
"to_agent": "content-creator",
"handoff_context": {
"campaign_theme": "AI Productivity",
"key_messages": ["Save 5 hours/week", "Focus on what matters"],
"target_audience": "Knowledge workers, 25-45",
"competitor_insights": "Gap in automation content",
"content_angles": ["Tutorial", "Case study", "Thought leadership"]
}
}
Stage 2 → Stage 3 Handoff
{
"from_agent": "content-creator",
"to_agent": "social-media-strategist",
"handoff_context": {
"content_assets": ["blog_post.md", "email_sequence.md", "social_posts.md"],
"creative_brief": "Visual style guide + examples",
"hashtag_recommendations": ["#productivity", "#aitools"],
"optimal_posting_times": {"twitter": "9am", "linkedin": "12pm"}
}
}
Stage 3 → Stage 4 Handoff
{
"from_agent": "social-media-strategist",
"to_agent": "analytics-reporter",
"handoff_context": {
"campaign_id": "CAMP-2024-Q1-001",
"channels": ["twitter", "linkedin", "newsletter"],
"spend": 5000.00,
"raw_metrics": {"impressions": 500000, "clicks": 8500}
}
}
Error Handling
| Agent | Error Type | Detection | Action | Fallback |
|---|---|---|---|---|
| trend-researcher | No clear trend | confidence < 50% | Extend research | Use evergreen topics |
| content-creator | Brand voice mismatch | brand_score < 8 | Revise | Escalate to brand-guardian |
| social-media-strategist | Platform rejection | policy_violation | Modify content | Use alternative platform |
| analytics-reporter | Data discrepancy | variance > 10% | Reconcile sources | Flag data issues |
Activation
Claude Code:
Activate marketing-campaign-pipeline: plan campaign for [product launch]
n8n Import:
Import integrations/n8n/marketing-campaign-workflow.json — configure social media API credentials.
Pipeline Sequence
trend-researcher → content-creator → social-media-strategist → analytics-reporter
Stage 1: Research & Insights (trend-researcher)
Input: Campaign objectives, target audience
Responsibilities:
- Market trend analysis
- Competitive research
- Audience insights
- Content angle identification
Output: Research brief, content themes, key messages
Handoff: Research insights to content-creator
Stage 2: Content Creation (content-creator)
Input: Research brief, campaign themes
Responsibilities:
- Write campaign copy
- Create blog content
- Draft email sequences
- Develop creative briefs
Output: Campaign content library
Handoff: Content assets to social-media-strategist
Stage 3: Distribution Strategy (social-media-strategist)
Input: Content assets, campaign goals
Responsibilities:
- Platform-specific adaptation
- Posting schedule
- Paid promotion strategy
- Influencer coordination
Output: Campaign execution plan, scheduled posts
Handoff: Campaign performance data to analytics-reporter
Stage 4: Performance Analysis (analytics-reporter)
Input: Campaign execution data, engagement metrics
Responsibilities:
- ROI calculation
- Channel performance comparison
- Audience insights
- Optimization recommendations
Output: Campaign report, learnings documentation
Triggers
- Product launch
- Seasonal campaign
- Competitive response
- Brand awareness initiative
Success Metrics
- Reach and impressions
- Engagement rate
- Click-through rate
- Conversion rate
- Cost per acquisition
- Campaign ROI
What's inside
Pipeline diagram, 4 stage descriptions, 3 data contracts, error table, activation instructions, triggers, success metrics
Change this for your project
- Replace
CAMP-2024-Q1-001with your campaign ID format - Replace
integrations/n8n/marketing-campaign-workflow.jsonwith your workflow path - Replace
#productivityand#aitoolswith your hashtags
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Error table with detection threshold and fallback per agent
- Structured handoff contracts with typed fields per stage
- Mermaid diagram showing both happy path and error branches
Related Documents
Media Handling Playbook - Zyeuté v3
Documents upload, storage, optimization, delivery, and edge-case handling for images, videos, and audio in a social app.
Visual Truth Engine: Product-Market Fit & Go-to-Market Strategy
Outlines a product-market fit strategy and go-to-market plan for a B2B SaaS tool that automates proof asset creation for video creators.
Trader ROI Playbook (Codex + CI)
Defines weekly ROI targets, task prioritization lanes, guardrails, and a scorecard template for measuring engineering output per hour.
Devin Triage Playbook
Defines a 7-phase automated triage playbook for Devin to analyze alerts, find root causes, implement fixes, and notify teams.