AI Bot Deployment Guide
Integration of acreprofit-marketing AI agents with acreprofit-web serverless infrastructure.
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
Related Documents
Valet V1 β Architecture & Implementation Plan
1. [Vision & Scope](#1-vision--scope)
Writing Effective Skills
What makes a skill actually work vs. being ignored or misapplied. Based on studying production skills across Claude Code (Superpowers, Trail of Bits, Anthropic's official plugins), Codex (babysit-pr, skill-creator, curated catalog), OpenClaw (55 bundled skills, 13,700+ community), and Cursor/Cline rule systems (BMAD-METHOD, RIPER-5, steipete/agent-rules).
Spotipy Types - Implementation Plan
A standalone type stub package for spotipy using Pydantic models generated from the official Spotify Web API OpenAPI schema.
Project Development Requirements (PDR)
**Generated**: 2026-03-22