AI-Generated Summary Block for WordPress Posts - with OpenAI, WordPress, Google Sheets & Slack
Configured with Date Time, Google Sheets, HTTP Request, OpenAI Chat Model, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- AI & models
- Routing
- Web / API
- Data store
- Transform
- Messaging
- Integration
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| When clicking ‘Test workflow’ | Trigger | Manual Trigger | See node parameters |
| Text Classifier | AI & models | Text Classifier | See node parameters |
| OpenAI Chat Model | AI & models | OpenAI Chat Model | See node parameters |
| Loop Over Items | Routing | Loop Over Items | See node parameters |
| If | Routing | If | See node parameters |
| Webhook | Trigger | Webhook | See node parameters |
| Schedule Trigger | Trigger | Schedule Trigger | See node parameters |
| Wordpress - Update Post | Web / API | HTTP Request | POST |
| Google Sheets - Get rows | Data store | Google Sheets | See node parameters |
| HTML to Markdown | Transform | Markdown | See node parameters |
| OpenAI | AI & models | Open Ai | See node parameters |
| Google Sheets - Add Row | Data store | Google Sheets | append |
| Slack - Notify Channel | Messaging | Slack | See node parameters |
| Set fields - From Webhook input | Transform | Edit Fields | See node parameters |
| Date & Time - Substract | Transform | Date Time | subtractFromDate |
| Set fields - Prepare data for Gsheets & Slack | Transform | Edit Fields | See node parameters |
| WordPress - Get Post2 | Integration | Wordpress | get |
| No Operation, do nothing | Routing | No Op | See node parameters |
| WordPress - Get Last Posts | Integration | Wordpress | getAll |
| WordPress - Get Post1 | Integration | Wordpress | get |
| WordPress - Get All Posts | Integration | Wordpress | getAll |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
googleApihttpHeaderAuthopenAiApislackOAuth2ApiwordpressApi
Workflow notes
Trigger - Two Options
Trigger - Two 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.:
Schedule Trigger
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:
Date & Time - Subtract: Subtracts the scheduled interval from the current execution timestamp. For example, if the workflow runs every 5 minutes, it subtracts 5 minutes from the execution time.WordPress - Get Posts: Uses the output of theDate & Time - Subtractnode as a filter to retrieve only posts published after the last execution.
Webhook Trigger
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:
- A Webhook plugin on WordPress (not recommended due to plugin dependency).
- A PHP function that triggers the webhook with authentication for security.
⚠️ 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:
Set Fields - From Webhook Input: Configures the fields based on the data sent to the webhook.WordPress - Get Post: Retrieves the post using thepost_idreceived from the webhook, ensuring higher accuracy than the schedule trigger approach.
WordPress - Get All Posts
WordPress - Get All Posts
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.
🔹 Considerations:
- In this template, the query is limited to 5 posts to prevent accidental large-scale execution. This makes it easier to fix any issues.
- You can add filters (category, tag, date, etc.) to target only the posts for which you want an AI Summary.
- You can enable the "Get All Posts" option in the node if you want summaries for all posts—but make sure this is intentional.
- The more posts you process, the higher the cost in OpenAI API usage.
Loop Over Items
Loop Over Items
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.
🔹 In Production - Using the "Schedule Trigger"
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.
🔹 In Production - Using the "Webhook Trigger"
With a Webhook Trigger, the workflow typically runs for one post at a time, meaning the "Loop Over Items" node is not strictly necessary.
- You can remove it for a slightly more efficient workflow.
- However, keeping it won’t cause any issues—it will simply loop over one item instead of multiple.
Google Sheets - Get Rows & IF Nodes
Google Sheets - Get Rows & IF Nodes
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.
🔹 How It Works:
- On the first execution, posts retrieved from WordPress and processed for AI summarization are added to a Google Sheet.
- On subsequent executions, when the workflow retrieves new posts, it checks if the
post_idis already recorded in Google Sheets.
🔹 IF Node Logic:
- ✅ If a row exists for the
post_id→ The post already has an AI Summary. The workflow skips processing and moves to the"Loop Over Items"node. - ❌ If no row exists for the
post_id→ The post does not have an AI Summary, so the workflow continues along the execution path that leads to AI Summary generation.
WordPress - Get Post & HTML to Markdown Nodes
WordPress - Get Post & HTML to Markdown Nodes
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.
🔹 WordPress - Get Post
- The
context=editoption is enabled to retrieve the raw post data. - This is necessary because the post content will be updated later in the workflow.
🔹 HTML to Markdown
- Converts the retrieved HTML content into Markdown format.
- This makes the text easier to process for the LLM (Large Language Model) in the next step.
- Markdown ensures that the AI better understands the structure and formatting of the content.
Text Classifier
Text Classifier
This step classifies posts into categories:
not_summarized→ If the post does not have a summary, the following nodes execute the AI summary generation.summarized→ If the post already has a summary, the workflow skips processing:- The workflow moves to
"Loop Over Items". - The
"Done"branch goes to the"Do Nothing"node.
The LLM model used is gpt-4o-mini—it's efficient and cost-effective, but you can choose another model if needed.
🔹 Why Use a Text Classifier?
The previous node already filters posts based on Google Sheets, but adding this classification step makes the workflow even more robust:
- ✅ Extra validation: If a post already has an AI Summary but, for some reason, is not listed in Google Sheets, this step prevents duplicate summaries.
- ✅ Avoids redundancy: If a post already contains a manual or pre-existing summary at the top (not necessarily AI-generated), this step prevents adding an AI Summary that would be redundant.
OpenAI - Message a Model
OpenAI - Message a Model
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.
🔹 Customization Required
To ensure optimal results, you should:
- Specify your website's theme in the system prompt. The default example uses electric mobility, but you can replace it with a more relevant theme (e.g., "sustainable mobility", "urban transport," etc.).
- Modify the "Good" and "Bad" output examples—since the template is pre-configured for electric mobility, make sure to adapt the examples to match your content.
🔹 Output Format
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:
- Background color, text color, and font weight
- Section title (e.g., rename
"AI Summary") - Padding, margins, and border styling
- Removing or customizing the separator
🔹 Default Generated HTML
WordPress - Update Post
WordPress - Update Post
This API call updates the WordPress post and its excerpt.
https://<your-domain.com>/wp-json/wp/v2/posts/{{ $('Loop Over Items').item.json.id }}
🔹 What It Does
- Adds the AI Summary at the top of the post.
- Updates the post excerpt using data retrieved from the
WordPress - Get Post2node: - If a manual excerpt exists, it is preserved.
- If the excerpt was simply the beginning of the article, it remains unchanged.
- This prevents the AI Summary from replacing the excerpt, ensuring a better user experience on your blog’s article listing page.
Set Fields - Prepare Data for Google Sheets & Slack
Set Fields - Prepare Data for Google Sheets & Slack
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.
🔹 Default Fields in This Template:
The following fields are pre-configured:
post_id→ The WordPress post ID ({{ $json.id }})title→ The rendered title of the post ({{ $json.title.rendered }})post_link→ The direct URL to the post ({{ $json.link }})edit_link→ A direct link to edit the post in WordPress (https:///wp-admin/post.php?post={{ $json.id }}&action=edit)summary→ The AI-generated summary from the OpenAI node ({{ $('OpenAI').item.json.message.content }})summary_date→ The date and time when the AI Summary was generated and added to the post.
💡 Customization Tip:
- You can add additional fields if you want to include more data (e.g., post category, author name, publication date).
- This step ensures that the necessary information is properly structured before sending it to Google Sheets and Slack.
Google Sheets - Add Row & Slack - Notify
Google Sheets - Add Row & Slack - Notify
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.
🔹 Google Sheets - Add Row
This node automatically maps the columns in Google Sheets, meaning you don't need to manually define each field.
🛠 Configuration Details
- Google Sheets Document →
AI Summary WordPress - Sheet Name →
AI Summarized Posts - Mapping Mode → Auto-map columns based on field names
- Automatically added fields (examples, based on your setup):
post_idsummarypost_linkedit_linksummary_date
💡 Since columns are mapped automatically, ensure the column names in Google Sheets match the field names in n8n.
🔹 Slack - Notify
This node sends a message to Slack when a post has been updated with an AI Summary.
🛠 Configuration Details
- Channel →
wp-posts-ai(you can choose another channel) - Message Format → Simple Text Message
- Notification Text -> Configured inside the node (check the "Message Text" field)
💡 Best Practices:
- 🔕 On the first execution, consider deactivating this node if you have many posts to avoid excessive notifications.
- 📢 Consider creating a dedicated Slack channel for this workflow to keep AI summary updates separate from other discussions.
📝 AI-Generated Summary Block for WordPress Posts
📝 AI-Generated Summary Block for WordPress Posts
🚀 What is this workflow?
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.
Example of AI Summary Section
🔄 How It Works
- Triggers → Runs on a scheduled interval or via a webhook when a new post is published.
- Retrieves posts → Fetches content from WordPress and converts HTML to Markdown for AI processing.
- AI Summary Generation → Uses OpenAI to create a concise summary.
- Post Update → Inserts the summary at the top of the post while keeping the original excerpt intact.
- Data Logging & Notifications → Saves processed posts to Google Sheets and notifies a Slack channel.
🎯 Why use this workflow?
✅ 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!
AI-Generated Summary Block for WordPress Posts - with OpenAI, WordPress, Google Sheets & Slack
AI-Generated Summary Block for WordPress Posts - with OpenAI, WordPress, Google Sheets & Slack
Purpose and structure
This folder contains the AI-Generated Summary Block for WordPress Posts - with OpenAI, WordPress, Google Sheets & Slack workflow. Its executable nodes use dateTime, googleSheets, httpRequest, if, lmChatOpenAi, manualTrigger, markdown, noOp, openAi, scheduleTrigger, set, slack, splitInBatches, textClassifier, webhook, wordpress. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
When clicking ‘Test workflow’, Webhook, Schedule Trigger
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Datetime/1272_Datetime_Webhook_Create_Webhook.json MIT; preserve source notices.