Skip to main content

Overview

Meta Ads Copilot is designed to run on autopilot. Set up automated daily checks, get morning briefings delivered to Slack or Telegram, and let the agent monitor your ads 24/7. There are two ways to automate:
  1. Cron jobs (lightweight, runs scripts on a schedule)
  2. OpenClaw scheduling (conversational, AI-powered briefings)

Cron Jobs (Lightweight Automation)

Use cron to run reports on a schedule and send results via email, Slack, or save to files.

Daily Morning Check

Run the 5 Daily Questions every morning at 8am:
1

Make run.sh executable

2

Open crontab editor

3

Add the cron job

Replace /path/to/meta-ads-kit with your actual directory.
4

Create logs directory

5

Test the job manually

Now every morning at 8am, the daily check runs and results are saved to logs/daily-YYYY-MM-DD.log.

Cron Schedule Examples

Sending Results to Slack

Pipe report output to a Slack webhook:
1

Create a Slack incoming webhook

  1. Go to api.slack.com/apps
  2. Create a new app → From scratch
  3. Enable Incoming Webhooks
  4. Add webhook to your workspace
  5. Copy the webhook URL (starts with https://hooks.slack.com/services/)
2

Add webhook to .env

.env
3

Create a notification script

scripts/notify-slack.sh
Make it executable:
4

Update your cron job

Now you get daily ad reports delivered to Slack every morning.

Sending Results via Email

Use mail command (requires sendmail or postfix):
Or use a script with an email service:
scripts/notify-email.sh

OpenClaw Scheduling (AI-Powered Automation)

If you’re running with OpenClaw, you get conversational automation with AI-generated summaries.

Install OpenClaw

1

Install globally

2

Verify installation

3

Start the agent

This launches the Meta Ads Copilot agent.

Set Up Morning Briefings

Instead of editing crontab, just tell the agent what you want:
The agent:
  1. Creates a cron job automatically
  2. Runs the daily check
  3. Analyzes results with AI
  4. Generates a strategist-level summary
  5. Sends to your preferred channel

Example Morning Briefing

What you receive in Slack:
You reply: approve Agent:
All from your phone, over coffee, in 30 seconds.

Custom Automation Commands

Tell the agent what you want, naturally:
The agent translates natural language into scheduled tasks and conditional logic.

OpenClaw Cron Syntax

Behind the scenes, OpenClaw uses cron. You can also specify cron expressions directly:

Running in the Background (Production)

For production deployments, run the agent or cron jobs as a system service.

Using systemd (Linux)

1

Create a service file

/etc/systemd/system/meta-ads-copilot.service
2

Create a timer

/etc/systemd/system/meta-ads-copilot.timer
3

Enable and start the timer

4

Check status

Using Docker

Run the agent in a container with cron:
Dockerfile
Build and run:
You’ll need to mount your social-cli credentials into the container or use environment variables for system user tokens.

Using GitHub Actions (Free Option)

Run daily checks in GitHub Actions (free for public repos, 2000 minutes/month for private):
.github/workflows/daily-check.yml
Add secrets in repo settings:
  • META_ACCESS_TOKEN (system user token)
  • META_AD_ACCOUNT (your account ID)
  • SLACK_WEBHOOK_URL (your webhook)

Notification Channels

Slack

Best for: Teams, rich formatting, threading Setup:
  1. Create incoming webhook (see above)
  2. Use scripts/notify-slack.sh
  3. Supports markdown, emojis, interactive buttons

Telegram

Best for: Personal notifications, mobile-first Setup:
1

Create a bot

Message @BotFather on Telegram:
Follow prompts, copy the bot token.
2

Get your chat ID

Message your bot, then visit:
Find "chat":{"id":123456789} in the response.
3

Create notification script

scripts/notify-telegram.sh
4

Add to .env

.env

Discord

Best for: Community, gaming, casual teams Setup:
  1. Server Settings → Integrations → Webhooks → New Webhook
  2. Copy webhook URL
  3. Similar script to Slack:
scripts/notify-discord.sh

Email

Best for: Formal reports, executives, compliance Use SendGrid, Mailgun, or AWS SES (see example above).

Troubleshooting

Cron job not running

Check cron is active:
Check cron logs:
Common issues:
  • PATH not set (cron doesn’t inherit shell PATH)
  • Permissions (script not executable)
  • Wrong directory (use absolute paths)
Fix:

Reports running but no Slack notifications

Test webhook manually:
If this works but cron doesn’t:
  • .env file not loaded (use absolute path: source /path/to/.env)
  • Environment variable not exported
  • Webhook URL has special characters (wrap in quotes)

Authentication fails in cron

Cause: social-cli config not accessible to cron user. Fix:
  1. Run cron as your user (not root):
  2. Or copy social-cli config to cron user’s home:
  3. Or use system user token:

OpenClaw agent not responding

Check if it’s running:
Restart:
View logs:

Scheduled tasks not executing in OpenClaw

List scheduled tasks:
Cancel and recreate:

Best Practices

  1. Start simple — One daily check at 8am
  2. Log everything — Redirect output to dated log files
  3. Test manually first — Run ./run.sh daily-check before scheduling
  4. Use absolute paths — Cron doesn’t know your working directory
  5. Monitor the monitors — Set up alerts if cron jobs fail
  6. Graceful degradation — If API fails, log and retry, don’t crash
  7. Rate limit awareness — Don’t schedule reports more often than every 15 minutes

Example Full Setup

Here’s a complete automation stack:
crontab
Result:
  • Automated monitoring 24/7
  • No manual Ads Manager checking
  • Proactive alerts before problems escalate
  • Full audit trail in logs
  • Team stays informed via Slack
  • Execs get clean email summaries