Build a weekly content calendar from YouTube and Instagram comments with OpenAI

Go to Workflow
0 views
Built by Rahul Joshi Rahul Joshi
Created on September 28, 2026

Description

Quick overview
This weekly workflow pulls recent comments from YouTube and Instagram, filters for real questions and requests, uses OpenAI to cluster and rank recurring topics, then writes a question bank and next-week content calendar to Google Sheets and posts a summary digest to Slack.

How it works
Runs weekly on a schedule trigger.
Fetches recent uploads from the configured YouTube channel and pulls top-level comment threads for each recent video via the YouTube Data API.
Fetches recent Instagram media for the configured account and pulls comments for recent posts via the Instagram Graph API.
Merges YouTube and Instagram comments, removes spam/duplicates, and keeps the most relevant questions and requests ranked by engagement.
Sends the curated comment set to OpenAI to cluster repeated questions into themes and then scores clusters using mention counts, likes, and cross-platform demand.
Appends the ranked clusters as rows to a Google Sheets “Question Bank” tab.
Uses OpenAI to generate a next-week content calendar from the top clusters, appends the plan to a Google Sheets “Content Calendar” tab, and posts a weekly digest to a Slack channel.

Setup
Add an HTTP Query Auth credential for the YouTube Data API v3 key and an HTTP Query Auth credential for an Instagram Graph API long-lived access token.
Add OpenAI credentials for the two OpenAI steps (clustering and calendar generation).
Add Google Sheets OAuth2 credentials, set the spreadsheet ID in both Google Sheets nodes, and ensure the spreadsheet has “Question Bank” and “Content Calendar” tabs with headers.
Add Slack OAuth2 credentials and set the target channel in the Slack message step.
Update the Config values (YouTube channel ID, Instagram user ID, lookback window, scan limits, posts per week, and platform mix) to match your accounts and posting strategy.

Nodes Used (5)

Code
n8n-nodes-base.code
Google Sheets
n8n-nodes-base.googleSheets
HTTP Request
n8n-nodes-base.httpRequest
OpenAI
@n8n/n8n-nodes-langchain.openAi
Slack
n8n-nodes-base.slack