π Generate weekly Twitter & Facebook performance reports with GPT-4o analysis
β‘ 90 views Β· π Market Research & Insights
π‘ Pro Tip β If youβve run into Facebookβs Graph API permission restrictions, ScraperNode is a community node that scrapes pages, groups, posts, and comments directly β no app review needed.
Description
Description
Automate your weekly cross-platform social media analytics workflow with AI-powered insights. ππ€ This system retrieves real-time Twitter (X) and Facebook data, validates and merges the metrics, formats them via custom JavaScript, generates a visual HTML summary with GPT-4o, stores structured analytics in Notion, and broadcasts key results through Gmail and Slack β all in one seamless flow. Perfect for marketing, social media, and growth teams tracking weekly engagement trends. ππ¬
What This Template Does
1οΈβ£ Starts on manual execution to fetch the latest performance data. πΉοΈ 2οΈβ£ Collects live metrics from both Twitter (X API) and Facebook Graph API. π¦π 3οΈβ£ Merges API responses into one unified dataset for analysis. π§© 4οΈβ£ Validates data completeness before processing; logs missing or invalid data to Google Sheets. π 5οΈβ£ Uses JavaScript to normalize data into clean JSON structures for AI analysis. π» 6οΈβ£ Leverages Azure OpenAI GPT-4o to generate a professional HTML analytics report. π§ π 7οΈβ£ Updates Notionβs βGrowth Chartβ database with historical metrics for record-keeping. ποΈ 8οΈβ£ Sends the HTML report via Gmail to the marketing or analytics team. π§ 9οΈβ£ Posts a summarized Slack message highlighting key insights and platform comparisons. π¬
Key Benefits
β Eliminates manual social media reporting with full automation. β Ensures clean, validated data before report generation. β Delivers visually engaging HTML performance summaries. β Centralizes analytics storage in Notion for trend tracking. β Keeps teams aligned with instant Slack and Gmail updates.
Features
- Dual-platform analytics integration (Twitter X + Facebook Graph).
- Custom JavaScript node for data normalization and mapping.
- GPT-4o model integration for HTML report generation.
- Real-time error logging to Google Sheets for transparency.
- Notion database update for structured performance tracking.
- Slack notifications with emoji-rich summaries and insights.
- Gmail automation for formatted weekly performance emails.
- Fully modular β easy to scale to other social platforms.
Requirements
- Twitter OAuth2 API credentials for fetching X metrics.
- Facebook Graph API credentials for retrieving page data.
- Azure OpenAI credentials for GPT-4o AI report generation.
- Notion API credentials with write access to βGrowth Chart.β
- Slack Bot Token with chat:write permission for updates.
- Google Sheets OAuth2 credentials for error logs.
- Gmail OAuth2 credentials to send HTML reports.
Environment Variables
- TWITTER_API_KEY
- FACEBOOK_GRAPH_TOKEN
- AZURE_OPENAI_KEY
- NOTION_GROWTH_DB_ID
- SLACK_ALERT_CHANNEL_ID
- GOOGLE_SHEET_ERROR_LOG_ID
- GMAIL_MARKETING_RECIPIENTS
Target Audience
π Marketing and growth teams analyzing engagement trends. π‘ Social media managers tracking cross-channel performance. π§ Data and insights teams needing AI-based summaries. π¬ Brand strategists and content teams monitoring audience health. π§Ύ Agencies and operations teams automating weekly reporting.
Step-by-Step Setup Instructions
1οΈβ£ Connect all required API credentials (Twitter, Facebook, Azure OpenAI, Notion, Gmail, Slack, Sheets). 2οΈβ£ Replace the username and page IDs in the HTTP Request nodes for your brand handles. 3οΈβ£ Verify the JavaScript node output structure for correct field mapping. 4οΈβ£ Configure the Azure GPT-4o prompt with your preferred tone and formatting. 5οΈβ£ Link your Notion database and confirm property names match (followers, likes, username). 6οΈβ£ Add recipient email(s) in the Gmail node. 7οΈβ£ Specify your Slack channel ID for automated alerts. 8οΈβ£ Test run the workflow manually to validate end-to-end execution. 9οΈβ£ Activate or schedule the workflow for regular weekly reporting. β
π Nodes Used
Google Sheets, HTTP Request, Facebook Graph API, Gmail, AI Agent, Azure OpenAI Chat Model
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File