This playbook extends the Meta Ads automation with AI image composition. We'll add a single LangGraph node that transforms product photos into marketing creatives using Gemini's vision model, then feeds these composed images into the existing campaign workflow.
Creative production is the bottleneck in Meta ads performance. Testing requires multiple variations, but traditional production means photographers, models, and weeks of turnaround.
This playbook extends the Meta Ads automation system with AI image composition, transforming basic product photos into complete campaign creatives in minutes.
The pipeline generates creative variations and deploys targeted campaigns:
Product Selection → AI Composition → Campaign Generation → Human Review → Meta Deployment
The system takes product indices from a fashion dataset (or your own images), generates professional marketing creatives using Gemini's image generation, creates targeted campaign structures, and deploys to Meta after human approval.
This extends the original LangGraph workflow with minimal modifications:
# Original workflow
workflow.set_entry_point("generate")
workflow.add_edge("generate", "review")
# Enhanced workflow - adds one node
workflow.add_node("compose", compose_images)
workflow.set_entry_point("compose")
workflow.add_edge("compose", "generate")
When use_composition: false, the compose node passes through immediately, preserving original behavior.
API Credentials
GOOGLE_AI_API_KEY # Powers image and campaign generation
META_ADS_TOKEN # Your Meta access token
META_ADS_ACCOUNT_ID # Format: act_123456789
META_PAGE_ID # Your Facebook page ID