Automated Blog Post Generation and Jekyll Publishing using AI and GitHub - n8n Workflow

Automate technical blog content creation using n8n and Gemini AI. This n8n workflow retrieves topics from Google Sheets, uses Tavily for research, generates Markdown, and publishes directly to GitHub for Jekyll sites.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Content marketers needing high-volume technical documentation.

  • Developers managing a Jekyll or static site blog on GitHub Pages.

  • Users looking for advanced examples of integrating LLMs (like Gemini) into a sophisticated n8n workflow.

  • Automation specialists seeking powerful n8n templates for content creation.

Overview

This comprehensive n8n workflow provides a complete end-to-end solution for content generation, research, and automated publication. It solves the pain point of manual context gathering and tedious formatting necessary for static site generators like Jekyll. The core value of this n8n template lies in its structure: it uses an n8n trigger to check Google Sheets for new topics. It then leverages the Tavily Web Search n8n node for deep web research, feeding this high-quality context to a Gemini AI agent. The n8n node configuration for the AI ensures the output is perfectly formatted Markdown, complete with YAML front matter. Finally, the workflow uses the GitHub n8n node to commit the file, instantly triggering the blog's build and deployment, proving the efficiency of n8n automation. This sophisticated n8n workflow is a prime example of production-ready automation.

How it Works


  1. Scheduled Execution: The n8n trigger node runs on a defined schedule (e.g., daily at 9 AM) to initiate the automation.

  2. Topic Retrieval: The workflow uses a Google Sheets n8n node to query the spreadsheet and find the next topic where the 'status' column is not marked as 'done'. This acts as the project task management component of the n8n workflow.

  3. Context Research: The extracted topic is passed to the Tavily Web Search n8n node, which performs a deep, advanced search to gather comprehensive, up-to-date context and source URLs.

  4. Context Preparation: A custom Code n8n node processes and summarizes the search results into a clean Context variable, optimizing the input for the Large Language Model.

  5. AI Generation: The Generate Blog with Gemini n8n node, configured as an AI agent, processes the Topic and Context. It uses an extremely detailed system prompt to ensure the output adheres to Jekyll's specific Markdown requirements, including the necessary front matter and structured headings. This LangChain n8n node handles the core generation.

  6. File Preparation: A Set n8n node dynamically generates the required filename (based on the current date and topic slug) and prepares the commit message, making the file ready for publication via the n8n workflow.

  7. GitHub Publication: The Commit Blog Post to GitHub n8n node connects to the target repository and commits the newly generated Markdown file directly to the _posts/ folder, finalizing the publication step.

  8. Status Update: The workflow uses a final Google Sheets n8n node to update the original topic row, setting the status to "done", ensuring the n8n trigger does not process the same topic again.

Installation Guide


  1. Import the n8n Workflow: Copy the provided JSON data and import it into your n8n instance as a new n8n workflow.

  2. Google Sheets Credentials: Configure the Google Sheets n8n node credentials. Ensure your spreadsheet contains a column for 'Title' and a column for 'status'.

  3. Tavily API Key: Set up credentials for the Tavily API n8n node.

  4. Gemini API Key: Configure your Gemini API key (or substitute with an alternative LLM like OpenAI) in the designated n8n node credentials.

  5. GitHub Credentials: Configure GitHub OAuth2 credentials and specify the target repository and owner name, ensuring the API key has write access to commit files.

  6. Customize: Review the system message within the Generate Blog with Gemini n8n node to personalize the tone, structure, and author details of your generated content.

  7. Activate: Set the n8n workflow to 'Active' to allow the scheduled n8n trigger to run.

Node Details

Schedule Trigger: The foundational n8n trigger that dictates when the automation runs, set here for daily execution.
Google Sheets (Get Topic from Google Sheet): Retrieves topic data. Key configuration filters rows where the status column is empty.
Tavily Web Search: Performs deep web research on the topic defined in the n8n workflow. Configured for 'advanced' search depth.
Code (Summarize Search Results): This custom n8n node processes Tavily results, selecting the top three items and formatting them into a structured Context variable for the AI.
Google Gemini Chat Model: The language model provider configured to handle the generation task for this n8n workflow.
Generate Blog with Gemini (Langchain Agent): The central AI n8n node. It uses a lengthy system prompt to enforce strict Markdown formatting, YAML front matter generation, and structured blog content, ensuring compatibility with Jekyll static sites.
Set (Prepare File for Commit): A crucial n8n node that uses expressions to dynamically create the required filePath (including date and slugified title) and the fileContent (the AI output).
GitHub (Commit Blog Post to GitHub): The publishing n8n node. It uses OAuth2 to commit the file to the posts/ path in the target repository.


  • Google Sheets (Mark Topic as Done in Sheet): An update n8n node that marks the row as 'done' using the rownumber input, providing robust tracking within the overall n8n workflow structure.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by
Saswat Saubhagya Rout
Saswat Saubhagya Rout

Featured*