n8n workflow template · 20 nodes · OpenAI
AI-Generated Summary Block for WordPress Posts - with OpenAI, WordPress, Google Sheets & Slack is a free n8n workflow template that starts when its webhook receives an HTTP request and works with OpenAI, Google Sheets, Slack and WordPress. It has 20 nodes, 3 of them AI nodes (Text Classifier, OpenAI Chat Model and OpenAI). The notes inside the workflow say: “This node is used for the initial/test run. In production, you should use the WordPress node that follows the Scheduled Trigger or Webhook Trigger instead.” To run it, you add your own credentials for Google Service Account, HTTP Header Auth, OpenAI API, Slack OAuth2 and WordPress API.
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
This node is used for the initial/test run. In production, you should use the WordPress node that follows the Scheduled Trigger or Webhook Trigger instead.
It retrieves all existing WordPress posts to generate an AI Summary.
Since multiple posts may be retrieved from the previous step, a "Loop Over Items" node is used to process each post individually, optimizing the execution of subsequent nodes.
You can continue using the "Loop Over Items" approach in production. Depending on your publication frequency and the schedule interval you've chosen, multiple posts could be retrieved in a single execution. This ensures each post is processed sequentially.
With a Webhook Trigger, the workflow typically runs for one post at a time, meaning the "Loop Over Items" node is not strictly necessary.
This step is used to check whether a post already has an AI Summary.
For the Google Sheets node, you can make a copy of this Google Sheets template by going to File → Make a copy.
This step retrieves the WordPress post data using the post_id and converts the HTML content to Markdown. This ensures that the text is formatted in a clean and structured way before being sent to the Text Classifier node (which works with AI). More details about this step are provided in the next sticky note.
This step classifies posts into categories
The LLM model used is gpt-4o-mini—it's efficient and cost-effective, but you can choose another model if needed.
The previous node already filters posts based on Google Sheets, but adding this classification step makes the workflow even more robust
This API call updates the WordPress post and its excerpt.
https:// /wp-json/wp/v2/posts/
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
This n8n template automates the process of adding an AI-generated summary at the top of your WordPress posts. It retrieves, processes, and updates your posts dynamically, ensuring efficiency and flexibility without relying on a heavy WordPress plugin.
No need for a WordPress plugin → Keeps your site lightweight. Highly flexible → Easily connect with Google Sheets, Slack, or other services. Customizable → Adapt AI prompts, formatting, and integrations to your needs. Smart filtering → Ensures posts are not reprocessed unnecessarily.
Check the detailed sticky notes for setup instructions and customization options!
To use this workflow, you have two trigger options.
The default trigger is "When clicking 'Test workflow'", allowing you to manually test the scenario.
If you want to use this workflow in production, you can choose one of the following triggers. You'll need to select the one you prefer and enable it.
This trigger checks at regular intervals (e.g., every 5 minutes) if a new post has been published on your WordPress blog and triggers the workflow accordingly.
Easy to set up Automates AI summaries without manual intervention
If you run the workflow manually once, the AI-generated summaries will be added to Google Sheets and processed in later steps to prevent duplication.
Recommended follow-up nodes: If you choose this trigger, the following nodes are suggested in the template
If you're familiar with webhooks, you can set up a webhook that triggers when a new post is published.
Faster than scheduled triggers More event-driven
You can implement this using either
Be cautious with how the webhook is triggered—you may not want it to fire on every post edit.
Recommended follow-up nodes for this option
This step sends the Markdown-formatted post to GPT-4o-mini, using a System Prompt to instruct the LLM to generate an AI Summary. You can review and modify the System Prompt directly within this node.
To ensure optimal results, you should
The model is instructed to return the summary in HTML format, which will be used to update the WordPress post.
Customization Tip: You may want to adjust the HTML styling to better match your WordPress theme. Consider modifying the following elements
[Key point 1] [Key point 2] [Key point 3] [Key point 4]
This node sets fields that will be used in Google Sheets and Slack. You can add or modify fields as needed to fit your specific use case.
The following fields are pre-configured
This step logs the post with an AI Summary into Google Sheets and sends a notification to Slack.
For the Google Sheets node, you can make a copy of this Google Sheets template by going to File → Make a copy.
This node automatically maps the columns in Google Sheets, meaning you don't need to manually define each field.
Since columns are mapped automatically, ensure the column names in Google Sheets match the field names in n8n.
This node sends a message to Slack when a post has been updated with an AI Summary.
The 20 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:
Configure your own credentials after importing. Create each credential in n8n, then select it in the node.
Do you need somewhere to run it? Read our guide to self-hosted n8n.
We can adapt this workflow to your apps, data and process, then deploy and support it.
Contact Us