What This Agent Does
This automated workflow transforms your content analytics into actionable insights by collecting performance data from YouTube and TikTok every week, then generating an AI-powered analysis report delivered straight to your inbox. Instead of manually logging into multiple platforms, copying statistics, and trying to identify trends yourself, this agent does all the heavy lifting automatically every Sunday at 9 PM.
Key benefits include:
-
Save 2-3 hours weekly by eliminating manual data collection and report creation
-
Never miss performance trends with consistent weekly tracking across platforms
-
Get AI-powered insights that identify what's working and suggest improvements
-
Maintain a historical record of your content performance via email archives
This workflow is perfect for content creators who want to stay on top of their analytics without the tedious manual work, allowing you to focus on creating great content instead of tracking spreadsheets.
Who Is It For
This agent is ideal for:
-
Multi-platform content creators managing both YouTube and TikTok channels who need consolidated analytics
-
Social media managers tracking performance metrics for clients or brands across platforms
-
Marketing professionals who need regular performance reports without manual data compilation
-
Content strategists looking for AI-assisted analysis to inform their content planning decisions
-
Growing creators who want professional-level analytics automation without hiring an analyst
Whether you're a solo creator or part of a small team, if you're spending more than 30 minutes a week manually checking stats and creating reports, this automation will transform your workflow.
Required Integrations
YouTube
Why it's needed: This integration retrieves your channel statistics including subscriber count, total views, video count, and recent performance metrics.
Setup steps:
- Navigate to Integrations in your TaskAGI dashboard
- Search for "YouTube" and click Connect
- Click Authenticate with Google to begin OAuth flow
- Select the Google account associated with your YouTube channel
- Grant TaskAGI permission to view your YouTube channel analytics (read-only access)
- Confirm the connection is active with a green checkmark
Important notes:
- You must be the owner or have analytics access to the YouTube channel
- The integration uses OAuth, so no manual API key creation is required
- Permissions are read-only; TaskAGI cannot modify your channel
Anthropic
Why it's needed: This integration powers the AI analysis that transforms raw metrics into meaningful insights, trend identification, and actionable recommendations.
Setup steps:
- Visit console.anthropic.com and create an account or sign in
- Navigate to API Keys in the Anthropic console
- Click Create Key and give it a descriptive name like "TaskAGI Content Reports"
- Copy the API key immediately (it won't be shown again)
- Return to TaskAGI and go to Integrations
- Find "Anthropic" and click Connect
- Paste your API key in the authentication field
- Click Save to complete the connection
Cost considerations:
- This workflow uses Claude Sonnet 4.5, which costs approximately $0.03-0.10 per report
- Monthly cost for weekly reports: typically under $0.50
- Set up billing alerts in your Anthropic console to monitor usage
Gmail
Why it's needed: This integration delivers your completed analytics report directly to your email inbox each week.
Setup steps:
- Go to Integrations in TaskAGI
- Search for "Gmail" and select Connect
- Click Authenticate with Google
- Choose the Google account where you want to receive reports
- Grant TaskAGI permission to send emails on your behalf
- Verify the connection shows as active
Alternative options:
- You can send to any email address, not just the authenticated account
- Consider creating a dedicated label/folder in Gmail for these reports
- Set up Gmail filters to automatically organize incoming reports
Configuration Steps
Step 1: Configure the Schedule Trigger
The Weekly Schedule (Sunday 9pm) node determines when your report runs.
- Click on the trigger node to open its settings
- Set the schedule using cron syntax:
0 21 * * 0
-
0 = minute (top of the hour)
-
21 = hour (9 PM in 24-hour format)
-
* * 0 = every Sunday
- Select your timezone from the dropdown to ensure correct timing
-
Optional customization: Change to a different day/time that suits your workflow (e.g.,
0 9 * * 1 for Monday 9 AM)
Step 2: Set Up YouTube Channel Stats
The Get YouTube Channel Stats node retrieves your channel metrics.
- Select your connected YouTube integration from the dropdown
-
Channel ID: Leave as
mine to automatically fetch your authenticated channel, or enter a specific channel ID
- The node will retrieve: subscriber count, total views, video count, and engagement metrics
- No additional configuration needed—the node automatically passes data to the next step
Step 3: Configure TikTok Stats Scraping
The Scrape TikTok Stats node uses an HTTP request to gather TikTok metrics.
- In the
body field, replace @YOUR_TIKTOK_PROFILE with your actual TikTok username (keep the @ symbol)
- Example:
{"profiles":["@contentcreator123"],"resultsPerPage":1}
- The
resultsPerPage parameter should remain 1 for weekly summaries
-
Important: Ensure your TikTok profile is public; private profiles cannot be scraped
Note: This node uses a third-party scraping service. If you experience issues, verify your TikTok username is correct and your profile is accessible.
Step 4: Combine All Metrics
The Combine All Metrics node uses custom JavaScript to merge data from both platforms.
This node is pre-configured with code that:
- Extracts YouTube metrics from the previous node's output
- Parses TikTok statistics from the HTTP response
- Creates a unified data structure for the AI to analyze
No configuration needed unless you want to add additional platforms or custom metrics.
Step 5: Configure AI Report Generation
The Generate AI Report node creates your insights using Claude AI.
- Select your Anthropic integration
-
Model: Confirm it's set to
claude-sonnet-4-5-20250929 (optimal balance of quality and cost)
-
Prompt: The pre-configured prompt instructs the AI to:
- Analyze week-over-week trends
- Identify top-performing content
- Provide actionable recommendations
- Format the report professionally
-
Optional customization: Edit the prompt to focus on specific metrics or add custom instructions like "Focus on engagement rate" or "Compare to last month"
Step 6: Set Up Email Delivery
The Send Email Report node delivers your completed analysis.
- Select your Gmail integration
-
To: Replace
YOUR_EMAIL_HERE with your email address (e.g., creator@example.com)
-
Subject: Customize if desired (default: "Weekly Content Report")
-
Body: Leave as
[[nodes.3628.content]] to insert the AI-generated report
-
Optional: Add CC recipients or modify the subject line to include the date
Testing Your Agent
Running Your First Test
- Click the Test button in the top-right corner of the workflow editor
- Select Run Full Workflow to execute all nodes in sequence
- Monitor the execution panel as each node completes (typically 15-30 seconds total)
Verification Checklist
After the YouTube node:
- ✓ Verify subscriber count appears in the output
- ✓ Check that view count and video count are populated
- ✓ Ensure no authentication errors appear
After the TikTok node:
- ✓ Confirm HTTP status code is 200 (success)
- ✓ Verify profile data is returned in the response
- ✓ Check that follower count and video metrics are present
After the Combine Metrics node:
- ✓ Review the combined data structure in the output panel
- ✓ Ensure both YouTube and TikTok data are present
- ✓ Verify no data fields are missing or null
After the AI Report node:
- ✓ Read through the generated report for coherence
- ✓ Confirm it includes analysis of both platforms
- ✓ Check that recommendations are specific and actionable
After the Email node:
- ✓ Check your inbox for the report email (may take 1-2 minutes)
- ✓ Verify formatting is readable and professional
- ✓ Confirm all sections of the report are included
Expected Results
A successful test will produce an email containing:
- Executive summary of your week's performance
- Platform-by-platform breakdown (YouTube and TikTok)
- Trend analysis comparing to previous periods
- 3-5 actionable recommendations for improvement
- Key metrics highlighted with context
Troubleshooting
YouTube Integration Issues
Error: "Failed to fetch channel information"
-
Solution: Re-authenticate your YouTube integration by disconnecting and reconnecting
- Verify you have analytics access to the channel
- Check that the channel ID is correct (or use
mine for your own channel)
Error: "Insufficient permissions"
-
Solution: During OAuth, ensure you grant analytics read permissions
- Some organization-managed accounts may require admin approval
TikTok Scraping Problems
Error: "Profile not found"
-
Solution: Double-check your TikTok username includes the @ symbol
- Verify your profile is public (go to TikTok settings → Privacy)
- Try accessing your profile in an incognito browser window to confirm it's publicly visible
Error: "Rate limit exceeded"
-
Solution: The scraping service has usage limits; wait 1 hour and retry
- Consider upgrading the scraping service if you need more frequent updates
AI Report Generation Issues
Error: "Invalid API key"
-
Solution: Verify your Anthropic API key is correctly entered
- Check that your Anthropic account has available credits
- Generate a new API key if the current one was revoked
Report is too generic or unhelpful
-
Solution: Customize the prompt with more specific instructions
- Add context like "My goal is to reach 10K subscribers" or "Focus on engagement metrics"
- Provide the AI with baseline metrics for better comparison
Email Delivery Problems
Email not received
-
Solution: Check your spam/junk folder
- Verify the email address is correctly entered without typos
- Re-authenticate your Gmail integration
- Test by sending to an alternative email address
Formatting issues in email
-
Solution: The AI report uses plain text; if you need HTML formatting, add a formatting node between the AI and email nodes
- Check that the reference
[[nodes.3628.content]] matches your actual AI node ID
General Workflow Errors
Error: "Node execution timeout"
-
Solution: This usually affects the HTTP request node; retry the workflow
- Check your internet connection and TaskAGI service status
Data not flowing between nodes
-
Solution: Verify node connections in the visual editor
- Check that output references match actual node IDs (e.g.,
nodes.3628.content)
- Review the data flow panel to identify where data stops flowing
Next Steps
After Successful Setup
-
Let it run automatically: Your workflow will now execute every Sunday at 9 PM without any action needed
-
Create a reports folder: Set up a Gmail label or folder to organize your weekly reports
-
Review your first month: After 4 weeks, review all reports to identify longer-term trends
-
Share with your team: Forward reports to collaborators or add them as CC recipients
Optimization Suggestions
Enhance your reports:
- Add Instagram or other platforms by duplicating the TikTok scraping node
- Include competitor analysis by adding additional channel monitoring
- Create a Google Sheets node to log metrics for long-term tracking
Customize the AI analysis:
- Adjust the prompt to focus on your specific goals (growth, engagement, monetization)
- Add seasonal context: "Consider that this is holiday season" or "Account for summer vacation trends"
- Request specific formats: "Provide metrics in a table" or "Use bullet points for recommendations"
Improve delivery:
- Add a Slack notification node for instant alerts on significant changes
- Create a PDF version of the report using a document generation node
- Set up conditional logic to only send emails when metrics change significantly
Advanced Usage Tips
Multi-channel management:
- Duplicate this workflow for different channels or clients
- Use workflow variables to manage multiple profiles from a single template
- Create a master dashboard workflow that aggregates all your reports
Data retention:
- Add a database node (Airtable, Google Sheets) to store historical metrics
- Build trend charts using the accumulated data
- Create month-end summary reports that analyze 4 weeks of data
Alert customization:
- Add conditional nodes that trigger special alerts for milestone achievements (10K subscribers!)
- Set up threshold monitoring to notify you of sudden drops in performance
- Create different report formats for different stakeholders (detailed for you, summary for clients)
Cost optimization:
- If reports are too expensive, switch to Claude Haiku model (cheaper, slightly less detailed)
- Reduce report frequency to bi-weekly if weekly is too often
- Use the "only send if changed" logic to skip weeks with minimal activity
Your automated content analytics system is now ready to provide consistent, insightful reports that help you make data-driven decisions about your content strategy. Enjoy your reclaimed time and improved insights!