Skip to main content

Generate automated social media reports with GPT-4o, Twitter, Facebook & Notion

Workflow preview

Workflow preview
100%
Generate automated social media reports with GPT-4o, Twitter, Facebook & Notion preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Description Automate your weekly social media analytics with this end to end AI reporting workflow. This system collects real time Twitter (X) and Facebook metrics, merges and validates data, ...

Best for

  • Social Media automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, @n8n/n8n-nodes-langchain.lmchatazureopenai, n8n-nodes-base.httprequest, n8n-nodes-base.merge, n8n-nodes-base.if, n8n-nodes-base.googlesheets, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.agent

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Rahul Joshi.

Original n8n.io source

1.1 Workflow description

Title
Generate automated social media reports with GPT-4o, Twitter, Facebook & Notion
Workflow name
Generate automated social media reports with GPT-4o, Twitter, Facebook & Notion

Description

Automate your weekly social media analytics with this end-to-end AI reporting workflow. 📊🤖 This system collects real-time Twitter (X) and Facebook metrics, merges and validates data, formats it with JavaScript, generates an AI-powered HTML report via GPT-4o, saves structured insights in Notion, and shares visual summaries via Slack and Gmail. Perfect for marketing teams tracking engagement trends and performance growth. 🚀💬

What This Template Does

1️⃣ Starts manually or on-demand to fetch the latest analytics data. 🕹️ 2️⃣ Retrieves follower, engagement, and post metrics from both X (Twitter) and Facebook APIs. 🐦📘 3️⃣ Merges and validates responses to ensure clean, complete datasets. 🔍 4️⃣ Runs custom JavaScript to normalize and format metrics into a unified JSON structure. 🧩 5️⃣ Uses Azure OpenAI GPT-4o to generate a visually rich HTML performance report with tables, emojis, and insights. 🧠📈 6️⃣ Saves the processed analytics into a Notion “Growth Chart” database for centralized trend tracking. 🗂️ 7️⃣ Sends an email summary report to the marketing team, complete with formatted HTML insights. 📧 8️⃣ Posts a concise Slack update comparing platform performance and engagement deltas. 💬 9️⃣ Logs any validation or API errors automatically into Google Sheets for debugging and traceability. 🧾

Key Benefits

✅ Centralizes all social metrics into a single automated flow. ✅ Delivers AI-generated HTML reports ready for email and dashboard embedding. ✅ Reduces manual tracking with Notion and Slack syncs. ✅ Ensures data reliability with built-in validation and error logging. ✅ Gives instant, visual insights for weekly marketing reviews.

Features

  • Multi-platform analytics integration (Twitter X + Facebook Graph API).
  • JavaScript node for dynamic data normalization.
  • Azure OpenAI GPT-4o for HTML report generation.
  • Notion database update for long-term trend storage.
  • Slack and Gmail nodes for instant sharing and communication.
  • Automated error capture to Google Sheets for workflow reliability.
  • Visual, emoji-enhanced reporting with HTML formatting and insights.

Requirements

  • Twitter OAuth2 API credentials for access to public metrics.
  • Facebook Graph API access token for page insights.
  • Azure OpenAI API key for GPT-4o report generation.
  • Notion API credentials with write access to “Growth Chart” database.
  • Gmail OAuth2 credentials for report dispatch.
  • Slack Bot Token with chat:write permission for posting analytics summaries.
  • Google Sheets OAuth2 credentials for maintaining the error log.

Environment Variables

TWITTER_API_KEY FACEBOOK_ACCESS_TOKEN AZURE_OPENAI_API_KEY NOTION_GROWTH_DB_ID GMAIL_REPORT_RECIPIENTS SLACK_REPORT_CHANNEL_ID GOOGLE_SHEET_ERROR_LOG_ID

Target Audience

📈 Marketing and growth teams tracking cross-platform performance 💡 Social media managers needing automated reporting 🧠 Data analysts compiling weekly engagement metrics 💬 Digital agencies managing multiple brand accounts 🧾 Operations and analytics teams monitoring performance KPIs

Step-by-Step Setup Instructions

1️⃣ Connect all API credentials (Twitter, Facebook, Notion, Gmail, Slack, and Sheets). 2️⃣ Paste your Facebook Page ID and Twitter handle in respective API nodes. 3️⃣ Verify your Azure OpenAI GPT-4o connection and prompt text for HTML report generation. 4️⃣ Update your Notion database structure to match “Growth Chart” property names. 5️⃣ Add your marketing email in the Gmail node and test delivery. 6️⃣ Specify the Slack channel ID where summaries will be posted. 7️⃣ Optionally, connect a Google Sheet tab for error tracking (error_id, message). 8️⃣ Execute the workflow once manually to validate data flow. 9️⃣ Activate or schedule it for weekly or daily analytics automation. ✅

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Configure GPT-4o Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatAzureOpenAi - lmChatAzureOpenAi
Config choices
Version 1

Block 3 - Fetch Twitter Metrics (X API)1

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 4 - Fetch Facebook Page Metrics (Graph API)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - Merge Platform Responses

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 6 - Validate API Response Integrity

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 7 - Log Errors in Google Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 8 - Normalize & Format Social Data (JavaScript)

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Generate HTML Social Performance Report (AI)

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 10 - Save Report to Notion Database

Type / Role
n8n-nodes-base.notion - notion
Config choices
Version 2.2

Block 11 - Send Email Summary to Marketing Team

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 12 - Announce Summary in Slack

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

Block 13 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note9

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Generate automated social media reports with GPT-4o, Twitter, Facebook & Notion
Complexity advanced
Nodes 22
Categories Social Media, AI Summarization
Author Rahul Joshi
Published 06 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10552/10552.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate automated social media reports with GPT-4o, Twitter, Facebook & Notion do?

Description Automate your weekly social media analytics with this end to end AI reporting workflow. This system collects real time Twitter (X) and Facebook metrics, merges and validates data, ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media, AI Summarization use case.