Weekly Reading Analysis and Content Generation with Gemini AI - n8n Workflow

Use this powerful n8n workflow to automatically fetch Readwise highlights, analyze them with Gemini 2.5 Pro via OpenRouter, and generate structured content ideas, saving the summary back to Readwise.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Content Creators and Bloggers who need weekly topic inspiration based on their reading.

  • Tech Consultants and Freelancers looking to synthesize learning into actionable business insights.

  • Knowledge Workers seeking a structured weekly review of their consumption habits.

  • Users familiar with n8n who want advanced examples of prompt engineering within an n8n workflow.

Overview

Keeping track of vast amounts of reading material and transforming it into useful content is challenging. This advanced n8n workflow solves this by creating a structured system for knowledge synthesis. It leverages the Readwise API to pull all articles and highlights from the last seven days, filters out low-engagement content, and uses a powerful LLM (Gemini 2.5 Pro via OpenRouter) to analyze the aggregated data. The core value of this n8n template lies in its sophisticated prompt engineering via the Prepare Prompt n8n node, which enforces strict formatting rules (like proper markdown links) to ensure the AI's output is immediately usable for content creation. Finally, the resulting analysis is formatted and pushed back into Readwise, creating a centralized, AI-generated weekly review.

How it Works

This automation can be initiated either manually or via the Monday - 09:00 n8n trigger.


  1. Data Retrieval & Filtering: The n8n workflow starts by executing two HTTP Request n8n node steps to fetch all articles and highlights updated in the past 7 days from the Readwise API. Articles are split and then filtered to ensure only items with greater than 10% reading progress are considered.

  2. Correlation: The system iterates through the filtered articles, using a Filter n8n node (Find Highlights for Article) to pull all corresponding highlights for each article ID.

  3. Data Aggregation: A Code n8n node (Merge Articles & Highlights) takes the correlated data and structures it cleanly, preparing it for the AI.

  4. Prompt Engineering: The Prepare Prompt Code n8n node dynamically builds a highly detailed prompt. This prompt includes the raw article data and highlights, specific persona instructions for the AI, and critical formatting rules (such as enforcing markdown link usage) to ensure high-quality output.

  5. AI Generation: The prepared prompt is sent to the Generate Weekly Insights n8n node, which utilizes the AI Model n8n node (configured for Google Gemini 2.5 Pro via OpenRouter). The AI generates a multi-sectioned analysis (Key Themes, Top Insights, Content Opportunities).

  6. Final Save: The AI's markdown output is converted to HTML using the Markdown n8n node. A final Code n8n node formats this HTML, title, and metadata into a valid JSON payload, which is then sent via an HTTP Request n8n node (Save Insights to Readwise) back to Readwise, creating a summarized article for easy reference.

Installation Guide

To deploy this powerful n8n workflow, follow these steps:


  1. Import: Copy the provided n8n workflow JSON and paste it into your n8n instance.

  2. Readwise Credentials: This workflow requires Readwise API credentials. You must set up an 'HTTP Header Auth' credential in n8n for Readwise, using your Readwise API token as the bearer token.

* Apply this credential to all four Readwise HTTP Request n8n node steps.

  1. AI Credentials (OpenRouter/Gemini): This n8n template uses OpenRouter to access Gemini 2.5 Pro. You will need to create an 'OpenRouter API' credential in n8n and link it to the AI Model n8n node.

  2. Customization (Optional but Recommended): Review the Prepare Prompt n8n node. Adjust the AI persona, the desired insight categories, and the tone to perfectly align the generated content with your professional needs.

  3. Activation: The automation is set up with an n8n trigger to run every Monday at 09:00, but you can also execute the n8n workflow manually.

Node Details

This advanced n8n workflow relies on several core n8n node types:

Schedule Trigger (Monday - 09:00): This n8n trigger automatically starts the process weekly, ensuring a consistent content review schedule.
HTTP Request (Fetch Articles/Highlights): These nodes connect directly to the Readwise V3 list endpoint. Key configuration involves dynamically setting the updatedAfter query parameter to filter for content from the last 7 days (={{ $now.minus(7, 'days') }}). They also utilize pagination settings to fetch all results.
Filter Articles >10% Read: A standard Filter n8n node that excludes articles where reading progress is less than or equal to 0.1, focusing the analysis only on highly engaged content.
Code (Merge Articles & Highlights): This complex custom code n8n node aggregates results from two branches of the n8n workflow, matching highlights to their parent articles. This is essential for clean data structuring.
Code (Prepare Prompt): The most critical n8n node for prompt engineering. It builds a meticulously structured prompt, embedding all reading data and strict formatting rules required by the LLM.
LLM Chat OpenRouter (AI Model): Configured to use google/gemini-2.5-pro as the generative engine, ensuring high-quality, professional insights.
Markdown (Convert Insights to HTML): Transforms the AI's output from markdown (which is easy for the AI to generate and format) into HTML, preparing it for ingestion by the Readwise API.
HTTP Request (Save Insights to Readwise): The final n8n node in the pipeline, using a POST request to save the formatted weekly summary back into your Readwise library.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by

Full Stack Developer turned AI & Automation Engineer, implementing intelligent solutions with custom code, LLMs & n8n. Need help debugging a tricky workflow? I offer focused 60-minute sessions to get you unstuck fast. Check the link below.

Featured*