Marketing Campaign Generator

Click to zoom
Marketing Campaign Generator
AI-powered marketing campaign generator that creates expanded prompts, images, posters, and landing pages in parallel using the Intersect AI gateway.
Take a simple marketing idea and transform it into a complete campaign with AI-generated assets. This workflow demonstrates advanced patterns like parallel execution and fan-out strategies, all powered by the Intersect platform's unified AI gateway.
What It Does
Takes a marketing prompt and generates:
- Expanded Prompt - AI summarizes and refines the original idea
- Image Prompt - Optimized prompt for image generation
- Poster/SVG Prompt - Prompt for vector graphics creation
- Landing Page Prompt - Copy and structure for web pages
- Final Assets - All assets generated in parallel for speed
Why It's Included
Shows parallel execution, fan-out patterns, and integration with Intersect's AI gateway for unified model access across multiple AI providers.
Workflow Visualization
Requirements
- Intersect API key (for AI gateway access)
Key Files
yaml
{
"version": "1.0",
"workflows": [
{
"id": "marketing-campaign",
"path": "./habit.yaml",
"enabled": true,
"webhookTimeout": 30000
}
],
"server": {
"port": 13000,
"host": "0.0.0.0",
"frontend": "./frontend",
"openapi": true
},
"defaults": {
"webhookTimeout": 30000
}
}yaml
id: marketing-campaign
name: Marketing Campaign
description: >-
A workflow that takes a marketing prompt, expands it, then generates image,
vector graphic, and landing page prompts, and creates the assets. Uses
environment variables for Intersect credentials.
version: "1.0"
nodes:
- id: prompt-expander
type: bits
position:
x: 316.9991487026001
y: -11.984291402917478
data:
label: Prompt Expander
framework: bits
source: npm
module: "@ha-bits/bit-intersect"
resource: ask_chatgpt
operation: ask_chatgpt
params:
model: gpt-5-mini
prompt: "In 2 sentences, summarize this marketing idea: {{habits.input.prompt}}"
temperature: 0.7
maxTokens: 50
credentials:
intersect:
host: "{{habits.env.HABITS_INTERSECT_HOST}}"
apiKey: "{{habits.env.HABITS_INTERSECT_API_KEY}}"
- id: image-prompt-generator
type: bits
position:
x: -418.2645195621046
y: 140.3164235298582
data:
label: Image Prompt Generator
framework: bits
source: npm
module: "@ha-bits/bit-intersect"
resource: ask_chatgpt
operation: ask_chatgpt
params:
model: gpt-5-mini
prompt: "Write a 10-word image prompt for: {{prompt-expander}}"
temperature: 0.8
maxTokens: 30
credentials:
intersect:
host: "{{habits.env.HABITS_INTERSECT_HOST}}"
apiKey: "{{habits.env.HABITS_INTERSECT_API_KEY}}"
- id: poster-prompt-generator
type: bits
position:
x: 97.70801606792486
y: 261.38576897811544
data:
label: Poster/SVG Prompt Generator
framework: bits
source: npm
module: "@ha-bits/bit-intersect"
resource: ask_chatgpt
operation: ask_chatgpt
params:
model: gpt-5-mini
prompt: "In 1 sentence, describe a poster for: {{prompt-expander}}"
temperature: 0.7
maxTokens: 30
credentials:
intersect:
host: "{{habits.env.HABITS_INTERSECT_HOST}}"
apiKey: "{{habits.env.HABITS_INTERSECT_API_KEY}}"
- id: landing-page-prompt-generator
type: bits
position:
x: 560.5038333522873
y: 157.83893892996755
data:
label: Landing Page Prompt Generator
framework: bits
source: npm
module: "@ha-bits/bit-intersect"
resource: ask_chatgpt
operation: ask_chatgpt
params:
model: gpt-5-mini
prompt: "In 1 sentence, describe a landing page for: {{prompt-expander}}"
temperature: 0.7
maxTokens: 30
credentials:
intersect:
host: "{{habits.env.HABITS_INTERSECT_HOST}}"
apiKey: "{{habits.env.HABITS_INTERSECT_API_KEY}}"
- id: image-generator
type: bits
position:
x: -538.3046602363528
y: 406.9169822999188
data:
label: Generate Marketing Image
framework: bits
source: npm
module: "@ha-bits/bit-intersect"
resource: generate_image
operation: generate_image
params:
model: gpt-image-1
prompt: "{{image-prompt-generator}}"
resolution: 1024x1024
quality: hd
credentials:
intersect:
host: "{{habits.env.HABITS_INTERSECT_HOST}}"
apiKey: "{{habits.env.HABITS_INTERSECT_API_KEY}}"
- id: website-creator
type: bits
position:
x: 601.9516565016136
y: 400.12206784113823
data:
label: Create Landing Page
framework: bits
source: npm
module: "@ha-bits/bit-intersect"
resource: create_canvas
operation: create_canvas
params:
type: webcanvas
prompt: "{{landing-page-prompt-generator}}"
credentials:
intersect:
host: "{{habits.env.HABITS_INTERSECT_HOST}}"
apiKey: "{{habits.env.HABITS_INTERSECT_API_KEY}}"
- id: pr-document-prompt-generator
type: bits
position:
x: 740.5166897725798
y: -47.75467317216666
data:
label: PR Document Prompt Generator
framework: bits
source: npm
module: "@ha-bits/bit-intersect"
resource: ask_chatgpt
operation: ask_chatgpt
params:
model: gpt-5-mini
prompt: "In 1 sentence, describe a PR doc for: {{prompt-expander}}"
temperature: 0.7
maxTokens: 30
credentials:
intersect:
host: "{{habits.env.HABITS_INTERSECT_HOST}}"
apiKey: "{{habits.env.HABITS_INTERSECT_API_KEY}}"
- id: pr-document-creator
type: bits
position:
x: 1004.6370804819302
y: 551.0352237895758
data:
label: Create PR Campaign Document
framework: bits
source: npm
module: "@ha-bits/bit-intersect"
resource: create_canvas
operation: create_canvas
params:
type: draftcanvas
prompt: "{{pr-document-prompt-generator}}"
credentials:
intersect:
host: "{{habits.env.HABITS_INTERSECT_HOST}}"
apiKey: "{{habits.env.HABITS_INTERSECT_API_KEY}}"
- id: poster-creator
type: bits
position:
x: 250
y: 550
data:
label: Create Campaign Poster
framework: bits
source: npm
module: "@ha-bits/bit-intersect"
resource: create_canvas
operation: create_canvas
params:
type: svgcanvas
prompt: "{{poster-prompt-generator}}"
credentials:
intersect:
host: "{{habits.env.HABITS_INTERSECT_HOST}}"
apiKey: "{{habits.env.HABITS_INTERSECT_API_KEY}}"
edges:
- id: e1
source: prompt-expander
target: image-prompt-generator
- id: e2
source: prompt-expander
target: poster-prompt-generator
- id: e3
source: prompt-expander
target: landing-page-prompt-generator
- id: e4
source: image-prompt-generator
target: image-generator
- id: e6
source: landing-page-prompt-generator
target: website-creator
- id: e7
source: prompt-expander
target: pr-document-prompt-generator
- id: e8
source: pr-document-prompt-generator
target: pr-document-creator
- id: e9
source: poster-prompt-generator
target: poster-creator
output:
originalPrompt: "{{habits.input.prompt}}"
expandedConcept: "{{prompt-expander}}"
imagePrompt: "{{image-prompt-generator}}"
posterPrompt: "{{poster-prompt-generator}}"
landingPagePrompt: "{{landing-page-prompt-generator}}"
prDocumentPrompt: "{{pr-document-prompt-generator}}"
generatedImage: "{{image-generator}}"
landingPage: "{{website-creator}}"
prDocument: "{{pr-document-creator}}"
poster: "{{poster-creator}}"example
# Intersect Marketing Campaign Example Environment Variables
# Copy this file to .env and fill in your credentials
# Required: Intersect host URL
HABITS_INTERSECT_HOST=https://your-intersect-instance.site
# Required: Your Intersect API key
HABITS_INTERSECT_API_KEY=your-api-key-hereQuick Start
Run directly using Cortex package, recommended for production runs, does not inlcude base or extra depdencies.
# First, download the example files
npx @ha-bits/cortex@latest server --config ./marketing-campaign/stack.yaml