Skip to Content
Week 6.2: Instagram & Email Automation

Week 6.2: Instagram & Email Automation


Week 6.2 Resources: Instagram & Email Automation

Required Tools & Accounts

This week focuses on connecting the final pieces of our automation pipeline.

  • Claude Code (Anthropic): We continue using this as our primary agent engine.
  • GetLate (Late): An API for scheduling and posting social media content (used for Instagram).
  • Instagram Account: You need an active account linked to the Late dashboard.
  • Google Chrome: Required for the browser automation segment of the lesson.

Terminal Commands

We use a specific flag this week to enable browser automation capabilities within Claude Code.

Running Claude with Chrome Permissions:

claude --dangerously-skip-permissions --chrome

Running a specific prompt directly (Headless Mode):

claude --dangerously-skip-permissions --chrome -p "execute workflows/instagram/add_instagram_comment.md"

Rewind Context (If the agent gets stuck):

/rewind

Class Prompts

Use these prompts to guide your agent through the creation of the Instagram and Email workflows.

1. Instagram Workflow Creation

Scaffold the Instagram logic based on YouTube logic:

study the files and structure of workflows/youtube create workflows/instagram/ - use the same file structures and overall architecture as workflows/youtube - use parallel subagents to do deep research to create all the necessary docs - for the video file, use the short_form_video in final_details.yaml - use a subagent to research how to upload to instagram with getlate.dev and then have the subagent create tools/instagram_tools.py similar to tools/youtube_tools.py

2. Fixing Instagram Tools

Instruct the agent to fix the tool (if upload fails or isn’t implemented correctly):

read docs/tools.md test tools/instagram_tools.py - environment variables are already in .env - if anything is broken, fix

Update tool logic for visibility settings:

The video failed to upload to instagram. review the docs at getlate.dev and update instagram_tools.py to actually upload to instagram by default. make sure that the videos are uploaded to instagram with private visibility

3. Browser Automation (Chrome)

Launch Chrome to interact with the live post: (Note: Ensure you have run claude with the --chrome flag first)

navigate to [YOUR_INSTAGRAM_POST_URL]

Like the post:

click the main like button for the post

Add a comment (Workflow approach):

create workflows/instagram/add_instagram_comment.md 1. navigate to https://www.instagram.com/p/[instagram_id]/ 2. click the main "like" button for the post 3. write a comment about the post based on [script_file] but don't send it yet 4. put the comment in the comment text input 5. hit enter

4. Email Automation

Create the Email Workflow:

study the files and structure of workflows/youtube create workflows/send_email/ - use the same file structures and overall architecture as workflows/youtube - use parallel subagents to do deep research to create docs for writing optimal email subjects and bodies. - for the video file, use the short_form_video in final_details.yaml - the workflow will use rube mcp tools to send email via gmail - from: info@aidolons.com - to: user@aidolons.com

Refine Email Content (Removing specific references):

read docs/effective-email-bodies.md - remove references to disney - update the opening line to be punchier

5. The “Master” Workflow

Combine all modules into one campaign runner:

create workflows/send_campaign.md - this workflow should execute the main workflows for youtube, instagram, and send_email in order.
Last updated on