Auto-categorize blog posts with OpenAI GPT-4, GitHub, and Google Sheets for Astro/Next.js
Ready for 3.0What this workflow does
This AI workflow has 18 nodes and runs when someone submits an n8n form (“Start process ”). Along the way it connects OpenAI Chat Model, GitHub and Google Sheets.
How it runs
Trigger: When someone submits an n8n form (“Start process ”).
- Get row(s) in sheet (Google Sheets): uses Google Sheets
- List posts/articles/pages (GitHub): list (file)
- List FileName only / Remove duplicates (Code): runs custom JavaScript code
- Get paths to files only from GitHub repository (Aggregate): combines items into one
- Get file paths only from GoogleSheets (Aggregate): combines items into one
- Merge: merges the data from its input branches
- Check new repo files for AI processing (Code): runs custom JavaScript code
- Switch: routes items into 2 branches
- No new posts/articles in GitHub (n8n Form): shows the next form page
- Get post/article file (GitHub): get (file)
…plus 4 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (13)
- AI Agent
@n8n/n8n-nodes-langchain.agent - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - GitHub
n8n-nodes-base.github - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - Aggregate
n8n-nodes-base.aggregate - Switch
n8n-nodes-base.switch - n8n Form Trigger
n8n-nodes-base.formTrigger - n8n Form
n8n-nodes-base.form - Merge
n8n-nodes-base.merge - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches
From the author
Automatically Assign Categories and Tags to Blog Posts with AI This workflow streamlines your content organization process by automatically analyzing new blog posts in your GitHub repository and assigning appropriate categories and tags using OpenAI. It…