Skip to content

Complete AI Pulse Newsletter Workflow

Instructions for AI Agents

You are about to execute a 2-phase newsletter creation workflow. Follow these instructions exactly:

Phase 1: Newsletter Generation

  1. Read the file: _workflow/template_instructions.md
  2. Execute completely: Follow all steps in that file from beginning to end
  3. Complete before proceeding: Ensure newsletter HTML file is generated

Phase 2: Gmail Draft Creation

  1. Read the file: _workflow/gmail_draft_instructions.md
  2. Execute completely: Follow all steps in that file from beginning to end
  3. Complete the process: Ensure Gmail draft is created with inline CSS

Execution Flow

AI Agent reads: complete_newsletter_workflow.md
    ↓
AI Agent reads: _workflow/template_instructions.md
AI Agent executes: All 7 steps → Newsletter HTML created
    ↓  
AI Agent reads: _workflow/gmail_draft_instructions.md
AI Agent executes: All 8 steps → Gmail draft created

That's it. Read file #1, execute it completely, then read file #2, execute it completely.


Quality Control Checklist

Phase 1 Completion Verification

  • Newsletter HTML file generated with proper filename
  • All template variables populated correctly
  • Article URLs formatted without .md extensions
  • Executive summaries are business-focused (not technical)
  • Issue metadata properly formatted
  • File saved and ready for Phase 2

Phase 2 Completion Verification

  • CSS successfully converted to inline styles
  • No <style> tags remaining in HTML
  • Dark theme colors properly applied (#202124, #282a2e, gradients)
  • Typography hierarchy maintained (font sizes, weights, colors)
  • Gmail draft created successfully with draft ID
  • Subject line professional and under 60 characters
  • User informed of completion and next steps

Error Handling

Phase 1 Issues

  • Missing articles: Ask user for specific date range or article selection
  • Template variables undefined: Check template.html for required variables
  • URL formatting errors: Ensure .md removal and proper base URL structure

Phase 2 Issues

  • Inline CSS conversion incomplete: Verify all classes and styles are converted
  • Gmail draft failure: Check MCP server connection and retry
  • Subject line too long: Automatically truncate while preserving key information
  • Styling not rendering: Confirm all critical styles are inlined (backgrounds, colors, typography)

Success Criteria

Complete Workflow Success

  1. Newsletter Generated: HTML file with proper executive design and content
  2. Gmail Draft Created: Email draft with inline CSS rendering correctly in Gmail
  3. User Informed: Clear next steps provided for review and distribution
  4. Quality Maintained: Executive-level content and professional design preserved throughout

Notes

  • This workflow is template-agnostic and works with any newsletter template system
  • Both instruction files can be updated independently without affecting this wrapper
  • The critical inline CSS conversion in Phase 2 ensures email client compatibility
  • Always test with user's email first before distributing to executive teams
  • Workflow can be interrupted between phases if needed for user review

This complete workflow ensures newsletter generation maintains professional quality from template processing through email delivery.