AutomationMart
Home/Browse/Auto-categorize blog posts with OpenAI GPT-4, GitHub, and Google Sheets for Astro/Next.js
n8n

Auto-categorize blog posts with OpenAI GPT-4, GitHub, and Google Sheets for Astro/Next.js

n8nn8n18 modulesv1.0
Google SheetsOpenAIGitHubGemini

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 compares new posts against existing entries in a Google Sheet, updates the metadata for each new article, and records the suggested tags and categories for review — all in one automated pipeline. --

At a glance

Auto-categorize blog posts with OpenAI GPT-4, GitHub, and Google Sheets for Astro/Next.js is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects Google Sheets, OpenAI, GitHub, Gemini. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
Google Sheets, OpenAI, GitHub, Gemini
Modules
18
Price
Free
Version
v1.0
Auto-categorize blog posts with OpenAI GPT-4, GitHub, and Google Sheets for Astro/Next.js workflow diagram

About this workflow

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 compares new posts against existing entries in a Google Sheet, updates the metadata for each new article, and records the suggested tags and categories for review — all in one automated pipeline. --- Who’s It For - Content creators and editors managing a static website (e.g., Astro or Next.js) who want AI-driven tagging. - SEO specialists seeking consistent metadata and topic organization. - Developers or teams managing a Markdown-based blog stored in GitHub who want to speed up post curation. --- How It Works 1. Form Trigger – Starts the process manually with a form that initiates article analysis. 2. Get Data from Google Sheets – Retrieves existing post records to prevent duplicate analysis. 3. Compare GitHub and Google Sheets – Lists all .md or .mdx blog posts from the GitHub repository (piotr-sikora.com/src/content/blog/pl/) and identifies new posts not yet analyzed. 4. Check New Repo Files – Uses a code node to filter only unprocessed files for AI tagging. 5. Switch Node – - If there are no new posts, the workflow stops and shows a confirmation message. - If new posts exist, it continues to the next step. 6. Get Post Content from GitHub – Downloads the content of each new article. 7. AI Agent (LangChain + OpenAI GPT-4.1-mini) – - Reads each post’s frontmatter (--- section) and body. - Suggests new categories and tags based on the article’s topic. - Returns a JSON object with proposed updates (Structured Output Parser) 8. Append to Google Sheets – Logs results, including: - File name - Existing tags and categories - Proposed tags and categories (AI suggestions) 9. Completion Message – Displays a success message confirming the categorization process has finished. --- Requirements - GitHub account with repository access to your website content. - Google Sheets connection for storing metadata suggestions. - OpenAI account (credential stored in openAiApi). --- How to Set Up 1. Connect your GitHub, Google Sheets, and OpenAI credentials in n8n. 2. Update the GitHub repository path to match your project (e.g., src/content/blog/en/). 3. In Google Sheets, create columns: - FileName, Categories, Proposed Categories, Tags, Proposed Tags. 4. Adjust the AI model or prompt text if you want different tagging behavior. 5. Run the workflow manually using the Form Trigger node. --- How to Customize - Swap OpenAI GPT-4.1-mini for another LLM (e.g., Claude or Gemini) via the LangChain node. - Modify the prompt in the AI Agent to adapt categorization style or tone. - Add a GitHub commit node if you want AI-updated metadata written back to files automatically. - Use the Schedule Trigger node to automate this process daily. --- Important Notes - All API keys and credentials are securely stored — no hardcoded keys. - The workflow includes multiple sticky notes explaining: - Repository setup - File retrieval and AI tagging - Google Sheet data structure - It uses a LangChain memory buffer to improve contextual consistency during multiple analyses. --- Summary This workflow automates metadata management for blogs or documentation sites by combining GitHub content, AI categorization, and Google Sheets tracking. With it, you can easily maintain consistent tags and categories across dozens of articles — boosting SEO, readability, and editorial efficiency without manual tagging.

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n → click the menu → Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

Create images from Google Sheets rows using Layerre and save to Google Drive

Automatically create images from Google Sheets data using Layerre and store the final files in Google Drive. This template eliminates the manual process of copying spreadsheet content into designs, exporting images, and uploading them to storage. The workflow starts with Google Sheets watching for new rows. Each row should contain text content and an image URL. Layerre then uses this data to generate an image based on your existing Canva design template. The generated image is downloaded via HT

Free

Generate chat completions with 2 Perplexity AI prompts and update Google Sheets rows

This automation updates Google Sheets with AI-generated chat completions. Triggered by new rows, Perplexity AI generates responses using 2 prompts, updating your spreadsheet efficiently.

Free

Send data from a custom webhook to Airtable and add a row in Google Sheets

Automatically transfer data from a custom webhook to Airtable and add a new row in Google Sheets for streamlined data management and organization.

Free

Create a new rows in a Google Sheets spreadsheet from a new member in Invision Community

This template regularly checks for new forum members in an Invision Community and uses the retrieved information to create new rows in a Google Sheets spreadsheet. The template is using [this sample](https://docs.google.com/spreadsheets/d/1eyQK4yqdhrMPUODn6TZwvsHQhIlL4dXw5chIMiEkwnI/edit?usp=sharing) Google Sheets spreadsheet as the destination for the new Invision Community members. You should make a copy of it before configuring the template. The template is scheduled to run every hour. You

Free

Log Telegram receipt images to Excel 365 using Tesseract OCR and GPT-4.1-mini

Log receipt transactions from Telegram images to Excel using OCR and AI OCR + AI + Duplicate Protection (n8n Workflow) Overview This workflow automatically converts receipt images or payment proof sent via Telegram into structured financial records stored in Excel 365. Core flow: The system is designed to reduce manual data entry errors and improve financial visibility by turning unstructured receipt images into reliable financial records. ⸻ How it works This workflow captures receipt images sen

Free

Transform RSS feeds into content with GPT-4o for Medium, LinkedIn & Instagram

Related News to Content Marketing Automation Overview This workflow automatically collects news from an RSS feed, identifies the most relevant article(s), and generates ready-to-use social media and blog content tailored for Medium, LinkedIn, and Instagram. It’s ideal for: • Marketing teams who want a steady flow of fresh content. • Social media managers looking to save time on research and writing. • Startups and creators who want consistent posting with minimal effort. Instead o

Free

Auto workflow backup to Google Drive – automated export of all your workflows

n8n Workflow Backup to Google Drive – Automated Export of All Your Workflows This workflow is designed to automatically create backups of all your workflows in n8n and store them as individual .json files in Google Drive. It's a fully automated system that helps developers, agencies, or automation teams ensure their automation logic is always safe, versioned, and ready to restore or share. What is this for? If you’re building and managing multiple automations inside n8n, losing a workflow due to

Free

AI-powered multi-channel lead outreach with JotForm, Gemini AI & HeyReach

AI-Powered Outreach Engine (Jotform + Gemini AI + HeyReach + Data Tables) 🚀 Overview This workflow turns every Jotform submission — whether from your website or a live marketing campaign — into a fully automated, AI-personalized outreach sequence. Using Google Gemini AI, it instantly generates LinkedIn messages and email content tailored to each lead’s company and context. Depending on the data provided (like LinkedIn profile or email), it automatically routes the mess

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint — instant download
  • Setup guide PDF included
  • 5 downloads · valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

₹2,499/ session
3 hrs · video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free