AI Bot Deployment Guide
Describes deploying 8 AI marketing bots via GitHub Actions, AWS Lambda, and Zapier webhooks to automate content, ads, and analytics.
What this file does
Describes deploying 8 AI marketing bots via GitHub Actions, AWS Lambda, and Zapier webhooks to automate content, ads, and analytics.
When to use it
- You want to automate multiple AI marketing agents from a single deployment pipeline
- You need to trigger bots selectively per campaign via API or GitHub Actions
- You are setting up serverless infrastructure for marketing automation with Zapier
Assumes this stack
AI Bot Deployment Guide
Integration of acreprofit-marketing AI agents with acreprofit-web serverless infrastructure.
π― Overview
The deployment system automatically triggers your 8 AI marketing bots from GitHub Actions workflows. Bots execute through Zapier webhooks, interacting with your marketing tools.
Architecture:
GitHub Push
β
GitHub Actions (deploy-ai-bots.yml)
β
AWS Lambda (bot_orchestrator.py)
β
Zapier Webhooks
β
AI Bots (8 agents)
β
Marketing Tools (Buffer, Klaviyo, etc.)
π Prerequisites
-
Both repos connected:
- β acreprofit-web (infrastructure)
- β acreprofit-marketing (AI bots)
-
GitHub secrets configured:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYSLACK_WEBHOOK(notifications)
-
Lambda environment variables:
DYNAMODB_TABLE- Bot deployment tracking tableGITHUB_TOKEN- For accessing marketing repoBRAND_BUILDER_WEBHOOK- Zapier webhook URLCONTENT_CREATOR_WEBHOOKSOCIAL_MANAGER_WEBHOOKEMAIL_STRATEGIST_WEBHOOKMEDIA_BUYER_WEBHOOKSEO_STRATEGIST_WEBHOOKEVENT_COORDINATOR_WEBHOOKDATA_ANALYST_WEBHOOK
π Quick Start
Deploy All Bots (Default)
From GitHub:
Actions β Deploy AI Bots to Infrastructure
Run workflow β campaign_name: "week-1-launch"
Leave "bots" empty β All 8 bots deploy
From API:
curl -X POST https://api.acreprofit.io/bots/deploy \
-H "Content-Type: application/json" \
-d '{
"action": "trigger_campaign",
"campaign_name": "week-1-launch"
}'
Deploy Specific Bots
From GitHub:
Actions β Deploy AI Bots
campaign_name: "ads-test"
bots: "media-buyer, data-analyst"
From API:
curl -X POST https://api.acreprofit.io/bots/deploy \
-H "Content-Type: application/json" \
-d '{
"action": "trigger_campaign",
"campaign_name": "ads-test",
"bots": ["media-buyer", "data-analyst"]
}'
π§ Configuration
Set Lambda Environment Variables
# Get function name
FUNCTION_NAME=$(aws lambda list-functions --query 'Functions[?FunctionName==`acreprofit-api`].FunctionName' --output text)
# Update environment variables
aws lambda update-function-configuration \
--function-name $FUNCTION_NAME \
--environment Variables={
DYNAMODB_TABLE=acreprofit-bots,
GITHUB_TOKEN=your_github_token,
BRAND_BUILDER_WEBHOOK=https://hooks.zapier.com/hooks/catch/...,
CONTENT_CREATOR_WEBHOOK=https://hooks.zapier.com/hooks/catch/...,
...
}
Add Zapier Webhooks
For each bot, create a Zapier webhook:
- Zapier Dashboard β Create Zap
- Trigger: Webhooks by Zapier β Catch Raw Hook
- Action: Connect to your marketing tools
- Webhook URL: Copy to Lambda environment
- Test: Send sample payload
Example payload structure:
{
"bot": "content-creator",
"campaign": "week-1-launch",
"instructions": "Create 5 blog posts about...",
"timestamp": "2026-01-24T15:30:00Z"
}
π Bot Descriptions
1. Brand Builder
- Role: Website design, brand identity
- Tools: Midjourney, Webflow, Figma
- Output: Brand guidelines, website layouts
- Webhook: Triggers brand asset creation
2. Content Creator
- Role: Blog posts, email copy, webinar scripts
- Tools: Claude, Jasper, Grammarly
- Output: Content calendar, written materials
- Webhook: Generates weekly content
3. Social Manager
- Role: Facebook, Instagram, LinkedIn, TikTok
- Tools: Buffer, Later, Canva
- Output: Social posts, graphics, scheduling
- Webhook: Posts to all platforms
4. Email Strategist
- Role: Email sequences, automation, list building
- Tools: Klaviyo, Privy
- Output: Email campaigns, automations
- Webhook: Launches email sequences
5. Media Buyer
- Role: Facebook & Google ads optimization
- Tools: Facebook Ads Manager, Google Ads, Hyros
- Output: Ad campaigns, bid strategies
- Webhook: Launches ad campaigns
6. SEO Strategist
- Role: Keywords, content optimization, backlinks
- Tools: SE Ranking, Surfer, Ahrefs
- Output: SEO recommendations, content briefs
- Webhook: Generates SEO content
7. Event Coordinator
- Role: Webinars, conferences, trade shows
- Tools: Eventbrite, Zoom, StreamYard
- Output: Event pages, promotions
- Webhook: Launches events
8. Data Analyst
- Role: KPIs, reporting, optimization
- Tools: Mixpanel, Tableau, GA4
- Output: Dashboards, reports
- Webhook: Generates analytics reports
π Workflow Examples
Weekly Campaign Launch (Automated)
Triggered by GitHub Actions schedule:
# .github/workflows/campaign-launch.yml
schedule:
- cron: '0 6 * * 1' # Every Monday 6am
Automatically:
- Reads campaign config from marketing repo
- Triggers all bots via API
- Logs deployment status
- Sends Slack notification
Manual Ad Testing Campaign
# Deploy only media buyer to test ads
curl -X POST https://api.acreprofit.io/bots/deploy \
-d '{
"campaign_name": "ad-test-jan24",
"bots": ["media-buyer"]
}'
Emergency Content Creation
# When trending topic appears, deploy content bots
curl -X POST https://api.acreprofit.io/bots/deploy \
-d '{
"campaign_name": "trending-topic-$(date +%s)",
"bots": ["content-creator", "social-manager"]
}'
π Monitor Deployments
GitHub Actions
GitHub β Actions β Deploy AI Bots to Infrastructure
View deployment logs in real-time
CloudWatch Logs
# View Lambda logs
aws logs tail /aws/lambda/acreprofit-api --follow
# Check specific campaign
aws logs filter-log-events \
--log-group-name /aws/lambda/acreprofit-api \
--filter-pattern "week-1-launch"
DynamoDB Deployments
# Check deployment history
aws dynamodb scan \
--table-name acreprofit-bots \
--limit 10 \
--scan-index-forward false
API History Endpoint
# Get last 10 deployments
curl https://api.acreprofit.io/bots/history?limit=10
# Get specific bot history
curl https://api.acreprofit.io/bots/history?bot_name=content-creator
π Troubleshooting
"Lambda function not found"
- Check function name in workflow
- Verify IAM permissions
- Confirm function was deployed
"Webhook failed"
- Verify Zapier webhook URL in Lambda environment
- Test webhook with
curl - Check Zapier logs for errors
- Ensure webhook is enabled
"DynamoDB table not found"
- Create table:
acreprofit-bots - Add partition key:
bot_id - Enable TTL (optional, 90 days)
"GitHub token invalid"
- Generate new token at github.com/settings/tokens
- Ensure
repoandcontentsscopes - Update Lambda environment variable
"Deployment hangs"
- Check CloudWatch logs
- Verify webhook endpoints are responsive
- Check for timeout issues (increase Lambda timeout)
- Monitor Zapier execution history
π Security
API Key Protection (Optional)
Add API key authentication to endpoints:
# In API Gateway, add authorizer
type: REQUEST
identity_source: method.request.header.Authorization
validation_expression: ^Bearer [-0-9a-zA-z\.]*$
Environment Variables
Never commit API keys or webhook URLs. Use GitHub secrets:
# In workflow
env:
BOT_WEBHOOK: ${{ secrets.BOT_WEBHOOK_URL }}
Webhook Signature Validation
Verify webhook came from Zapier:
import hmac
import hashlib
def verify_zapier_signature(request):
signature = request.headers.get('X-Zapier-Signature')
body = request.body
secret = os.getenv('ZAPIER_SECRET')
expected = hmac.new(
secret.encode(),
body.encode(),
hashlib.sha256
).hexdigest()
return hmac.compare_digest(signature, expected)
π Success Metrics
After first campaign deployment:
Expected Results (Week 1):
- β 5+ blog posts published
- β 20+ social posts scheduled
- β 3+ email sequences active
- β Ad campaigns running
- β Analytics dashboard updated
Deployment Efficiency:
- Deployment time: < 5 minutes
- Bot success rate: 95%+
- Webhook reliability: 99%+
- Error handling: Automatic retries
π― Next Steps
- Configure Zapier webhooks for all 8 bots
- Set Lambda environment variables with webhook URLs
- Test single bot deployment (start with content-creator)
- Create campaign configs in marketing repo
- Schedule weekly deployments via GitHub Actions
- Monitor dashboards for bot execution
- Optimize based on results
π Support
- Logs: CloudWatch
/aws/lambda/acreprofit-api - Status: GitHub Actions workflow runs
- Webhooks: Zapier execution history
- API: cURL test commands
- Issues: GitHub Issues
π Advanced: Custom Bot Deployment
To add a custom bot outside the 8 standard ones:
- Add to
agents/in marketing repo - Create Zapier webhook for new bot
- Update Lambda environment:
CUSTOM_BOT_WEBHOOK=... - Deploy: Include bot name in API call
curl -X POST https://api.acreprofit.io/bots/deploy \
-d '{
"campaign_name": "custom-test",
"bots": ["custom-bot", "content-creator"]
}'
Status: β
Ready to Deploy AI Bots
Bots: 8 configured
Integration: Serverless Infrastructure + Marketing Automation
Cost: Included in $11-18/month infrastructure budget
What's inside
Overview, prerequisites, quick start, configuration, 8 bot descriptions, workflow examples, monitoring, troubleshooting, security, success metrics, next steps, support, and advanced custom deployment
Change this for your project
- Replace
acreprofit-webandacreprofit-marketingwith your own repository names - Replace
https://api.acreprofit.io/bots/deploywith your own API endpoint - Replace
acreprofit-botsDynamoDB table name with your own - Replace each Zapier webhook URL (e.g.,
https://hooks.zapier.com/hooks/catch/...) with your own
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Orchestrating multiple specialized agents through a single Lambda function that fans out to webhooks
- Using GitHub Actions as a scheduled or manual trigger for marketing campaigns
- Storing webhook URLs as Lambda environment variables for each bot
Related Documents
MCP Integration Workflows and Orchestration Guide
Defines enterprise-grade integration patterns, orchestration strategies, and advanced workflows for MCP servers with code examples.
AI-Generated Short-Form Video Platform
Defines a modular SaaS pipeline that transforms uploaded MP4 videos into polished short-form clips using AI agents and human review.
Valet V1 β Architecture & Implementation Plan
Defines a hosted background coding agent platform with isolated sandboxed dev environments, multiplayer sessions, and YAML-driven workflows.
GitHub Topics & Skills Monitor
Provides a structured GitHub monitoring strategy with search queries, watchlist, and notification options for AI skills, agents, and MCP servers.