Generate AI-powered weekly email newsletters from WordPress with Gemini
WordPress Weekly Newsletter Generator
Overview: This automation automatically converts your latest WordPress posts into beautifully formatted email newsletters using AI, then sends them to your subscriber list every Friday.
What it does:
- Fetches your latest WordPress posts from the past week every Friday at 10 AM
- Filters posts to ensure there's content to include
- AI creates an engaging newsletter with compelling subject line and HTML content
- Parses the AI response to extract subject and content
- Sends formatted HTML email newsletter to your subscriber list
Setup Required:
-
WordPress Connection
- Configure WordPress credentials in the "Fetch Recent Posts" node
- Enter your WordPress site URL, username, and password/app password
-
Email SMTP Setup
- Set up SMTP credentials (Gmail, SendGrid, Mailgun, etc.) in the "Send Newsletter" node
- Replace
newsletter@yoursite.comwith your actual sender email - Replace subscriber emails in "To Email" field with your actual subscriber list
- Configure reply-to address for professional appearance
-
AI Configuration
- Set up Google Gemini API credentials
- Connect the Gemini model to the "AI Newsletter Creator" node
-
Customization Options
- Newsletter Schedule: Modify schedule trigger (default: Friday 10 AM)
- Post Count: Adjust number of posts to include (default: 5 from past week)
- Content Style: Modify AI system message for different newsletter tones
- Email Design: Customize HTML template and styling in AI prompt
-
Testing
- Run workflow manually to test all connections
- Send test newsletter to yourself first
- Verify HTML formatting appears correctly in email clients
Features:
- Automatic weekly scheduling
- AI-generated compelling subject lines
- HTML email formatting with proper structure
- Post filtering to avoid empty newsletters
- Professional email headers and reply-to setup
- Batch processing of multiple recent posts
Customization:
- Change newsletter frequency (daily, bi-weekly, monthly)
- Adjust AI prompts for different writing styles
- Modify email template design
- Add custom intro/outro messages
- Include featured images from posts
Need Help? For n8n coaching or one-on-one consultation
Generate AI-Powered Weekly Email Newsletters from WordPress with Gemini
This n8n workflow automates the creation and distribution of weekly email newsletters, leveraging the power of AI to generate engaging content from your WordPress posts. It simplifies the process of keeping your audience updated with your latest content, ensuring a consistent and personalized communication strategy.
What it does
This workflow performs the following key steps:
- Triggers Weekly: The workflow is scheduled to run on a weekly basis, ensuring regular newsletter generation.
- Fetches WordPress Posts: It connects to your WordPress site to retrieve recent posts.
- Generates Newsletter Content with AI: Using the Google Gemini Chat Model via an AI Agent, it processes the WordPress post data to generate a compelling newsletter draft.
- Conditional Email Sending: It includes an "If" node, allowing for conditional logic. This could be used, for example, to check if new posts exist or if the AI-generated content meets certain criteria before sending.
- Sends Email Newsletter: If the conditions are met, the workflow sends out the AI-generated newsletter via email.
- Code Execution (Optional/Helper): A "Code" node is present, which can be used for custom data manipulation, formatting, or additional logic within the workflow.
- Sticky Note (Documentation): A "Sticky Note" is included for internal documentation or notes about the workflow.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running instance of n8n.
- WordPress Account: Access to a WordPress site with posts.
- Google Gemini API Key: An API key for the Google Gemini Chat Model (configured within the "Google Gemini Chat Model" node).
- SMTP Credentials: Configuration for sending emails via an SMTP server (configured within the "Send Email" node).
Setup/Usage
- Import the Workflow: Download the JSON provided and import it into your n8n instance.
- Configure Credentials:
- WordPress: Configure your WordPress credentials in the "Wordpress" node.
- Google Gemini Chat Model: Provide your Google Gemini API key in the "Google Gemini Chat Model" node.
- Send Email: Set up your SMTP credentials in the "Send Email" node.
- Customize Nodes:
- Schedule Trigger: Adjust the schedule in the "Schedule Trigger" node to your preferred frequency (e.g., specific day and time each week).
- Wordpress: Configure the "Wordpress" node to fetch the desired number of recent posts or posts from a specific category.
- AI Agent: Customize the prompt in the "AI Agent" node to guide Gemini on how to structure and summarize your newsletter content (e.g., "Create a weekly newsletter summarizing the latest blog posts. Include a catchy subject line and a call to action for each post.").
- If: Modify the conditions in the "If" node if you have specific logic for when to send the newsletter (e.g.,
{{ $json.newPostsExist }}or{{ $json.aiContentApproved }}). - Send Email: Customize the recipient, sender, subject, and body of the email in the "Send Email" node, using expressions to dynamically insert content generated by the AI agent (e.g.,
{{ $('AI Agent').item.json.subject }}for the subject and{{ $('AI Agent').item.json.body }}for the email content). - Code: If needed, add custom JavaScript logic in the "Code" node to transform data or add specific functionalities.
- Activate the Workflow: Once configured, activate the workflow to start generating and sending your weekly newsletters automatically.
Related Templates
AI-powered code review with linting, red-marked corrections in Google Sheets & Slack
Advanced Code Review Automation (AI + Lint + Slack) Who’s it for For software engineers, QA teams, and tech leads who want to automate intelligent code reviews with both AI-driven suggestions and rule-based linting — all managed in Google Sheets with instant Slack summaries. How it works This workflow performs a two-layer review system: Lint Check: Runs a lightweight static analysis to find common issues (e.g., use of var, console.log, unbalanced braces). AI Review: Sends valid code to Gemini AI, which provides human-like review feedback with severity classification (Critical, Major, Minor) and visual highlights (red/orange tags). Formatter: Combines lint and AI results, calculating an overall score (0–10). Aggregator: Summarizes results for quick comparison. Google Sheets Writer: Appends results to your review log. Slack Notification: Posts a concise summary (e.g., number of issues and average score) to your team’s channel. How to set up Connect Google Sheets and Slack credentials in n8n. Replace placeholders (<YOURSPREADSHEETID>, <YOURSHEETGIDORNAME>, <YOURSLACKCHANNEL_ID>). Adjust the AI review prompt or lint rules as needed. Activate the workflow — reviews will start automatically whenever new code is added to the sheet. Requirements Google Sheets and Slack integrations enabled A configured AI node (Gemini, OpenAI, or compatible) Proper permissions to write to your target Google Sheet How to customize Add more linting rules (naming conventions, spacing, forbidden APIs) Extend the AI prompt for project-specific guidelines Customize the Slack message formatting Export analytics to a dashboard (e.g., Notion or Data Studio) Why it’s valuable This workflow brings realistic, team-oriented AI-assisted code review to n8n — combining the speed of automated linting with the nuance of human-style feedback. It saves time, improves code quality, and keeps your team’s review history transparent and centralized.
Generate Weather-Based Date Itineraries with Google Places, OpenRouter AI, and Slack
🧩 What this template does This workflow builds a 120-minute local date course around your starting point by querying Google Places for nearby spots, selecting the top candidates, fetching real-time weather data, letting an AI generate a matching emoji, and drafting a friendly itinerary summary with an LLM in both English and Japanese. It then posts the full bilingual plan with a walking route link and weather emoji to Slack. 👥 Who it’s for Makers and teams who want a plug-and-play bilingual local itinerary generator with weather awareness — no custom code required. ⚙️ How it works Trigger – Manual (or schedule/webhook). Discovery – Google Places nearby search within a configurable radius. Selection – Rank by rating and pick the top 3. Weather – Fetch current weather (via OpenWeatherMap). Emoji – Use an AI model to match the weather with an emoji 🌤️. Planning – An LLM writes the itinerary in Markdown (JP + EN). Route – Compose a Google Maps walking route URL. Share – Post the bilingual itinerary, route link, and weather emoji to Slack. 🧰 Requirements n8n (Cloud or self-hosted) Google Maps Platform (Places API) OpenWeatherMap API key Slack Bot (chat:write) LLM provider (e.g., OpenRouter or DeepL for translation) 🚀 Setup (quick) Open Set → Fields: Config and fill in coords/radius/time limit. Connect Credentials for Google, OpenWeatherMap, Slack, and your LLM. Test the workflow and confirm the bilingual plan + weather emoji appear in Slack. 🛠 Customize Adjust ranking filters (type, min rating). Modify translation settings (target language or tone). Change output layout (side-by-side vs separated). Tune emoji logic or travel mode. Add error handling, retries, or logging for production use.
AI-powered document search with Oracle and ONNX embeddings for recruiting
How it works Create a user for doing Hybrid Search. Clear Existing Data, if present. Add Documents into the table. Create a hybrid index. Run Semantic search on the Documents table for "prioritize teamwork and leadership experience". Run Hybrid search for the text input in the Chat interface on the Documents table. Setup Steps Download the ONNX model allMiniLML12v2augmented.zip Extract the ZIP file on the database server into a directory, for example /opt/oracle/onnx. After extraction, the folder contents should look like: bash bash-4.4$ pwd /opt/oracle/onnx bash-4.4$ ls allMiniLML12_v2.onnx Connect as SYSDBA and create the DBA user sql -- Create DBA user CREATE USER app_admin IDENTIFIED BY "StrongPassword123" DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp QUOTA UNLIMITED ON users; -- Grant privileges GRANT DBA TO app_admin; GRANT CREATE TABLESPACE, ALTER TABLESPACE, DROP TABLESPACE TO app_admin; Create n8n Oracle DB credentials hybridsearchuser → for hybrid search operations dbadocuser → for DBA setup (user and tablespace creation) Run the workflow Click the manual Trigger It displays Pure semantic search results. Enter search text in Chat interface It displays results for vector and keyword search. Note The workflow currently creates the hybrid search user, docuser with the password visible in plain text inside the n8n Execute SQL node. For better security, consider performing the user creation manually outside n8n. Oracle 23ai or 26ai Database has to be used. Reference Hybrid Search End-End Example