News-to-blog automation with GPT, Leonardo AI & WordPress publishing
This workflow automates the end-to-end process of generating and publishing blog posts from live news headlines.
Fetch Headlines – Collects the latest top stories from Google News and GDELT, merges them, and removes duplicates.
Headline Selection & Classification – Picks top headlines, checks relevance, and applies style rules.
Draft Generation – Uses GPT to create an initial blog article in a natural, human tone.
Tone & Expansion – Refines the draft for clarity, length, and style (customized to your own writing voice).
Image Generation – Sends the article topic to Leonardo AI, waits for the image to finish rendering, and retrieves the final asset.
Publish to WordPress – Uploads the generated image, assigns alt-text, creates a WordPress post with the article and image, and logs the publication to Google Sheets for tracking.
Purpose
Designed for hands-off content automation, this workflow continuously produces SEO-ready blog posts enriched with AI-generated images and publishes them directly to WordPress. It’s ideal for:
Running an automated blog that reacts to trending news.
Keeping websites updated with fresh, styled content without manual effort.
Creating a repeatable content engine that combines research, writing, and media assets in one pipeline.
Setup Instructions: Add Your Credentials
Go to Credentials in n8n and create:
OpenAI (for article generation)
Leonardo AI (for image generation)
WordPress (to publish posts)
(Optional) Google Sheets (to log published articles)
Attach these credentials to the matching nodes in the workflow.
Check the WordPress Node
Update the WordPress site URL to your own blog.
Make sure the category, tags, and status (publish/draft) are set the way you want.
n8n Workflow: News to Blog Automation with GPT & Leonardo AI for WordPress Publishing
This n8n workflow automates the entire process of converting trending news articles into unique, engaging blog posts, enriching them with AI-generated images, and publishing them to a WordPress site. It leverages the power of AI for content generation and image creation, streamlining content production for your blog.
What it does
This workflow performs the following steps:
- Triggers on Schedule: The workflow runs on a predefined schedule (e.g., daily, hourly) to check for new content.
- Fetches RSS Feed: It reads the latest articles from an RSS feed (e.g., a news source).
- Filters for New Articles: It checks if the fetched articles have already been processed to avoid duplicates using a "Merge" node with "Pass Through" mode.
- Generates Blog Post with OpenAI: For each new article, it uses OpenAI (GPT) to generate a unique, SEO-friendly blog post based on the news content.
- Generates Blog Image with Leonardo AI (via HTTP Request): It then calls the Leonardo AI API (or a similar image generation service) via an HTTP Request node to create a relevant featured image for the blog post based on the article's title or content.
- Publishes to WordPress: Finally, it publishes the AI-generated blog post and the AI-generated image as a new post on a WordPress site.
- Marks as Processed: After successful publishing, it updates a record (implicitly, by the "Merge" node's behavior) to ensure the article is not processed again.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running instance of n8n.
- RSS Feed URL: The URL of an RSS feed you want to monitor for news.
- OpenAI API Key: An API key for OpenAI to use its GPT models for content generation.
- Leonardo AI API Key: An API key for Leonardo AI (or a similar image generation service like Midjourney, Stable Diffusion, etc.) to generate images. This will be used in the "HTTP Request" node.
- WordPress Site: Access to a WordPress site with an API-enabled user account for publishing.
- WordPress Credentials: WordPress username and application password (or other authentication method) for the n8n WordPress node.
Setup/Usage
-
Import the Workflow:
- Download the provided JSON file for this workflow.
- In your n8n instance, click on "Workflows" in the left sidebar.
- Click "New" and then "Import from JSON".
- Paste the workflow JSON or upload the file.
-
Configure Nodes:
- Schedule Trigger (Node 839): Set your desired schedule for how often the workflow should run (e.g., every hour, daily).
- RSS Read (Node 37):
- Enter the
URLof the RSS feed you wish to monitor.
- Enter the
- OpenAI (Node 1250):
- Add your OpenAI API Key credential.
- Configure the prompt to generate blog posts from the RSS feed item's content.
- HTTP Request (Node 19) - Leonardo AI:
- This node will need to be configured to interact with the Leonardo AI API.
- Set the
URLfor the Leonardo AI image generation endpoint. - Set the
Method(likely POST). - Add your Leonardo AI API Key as a header (e.g.,
Authorization: Bearer YOUR_API_KEY). - Configure the
Bodyto send a prompt for image generation, likely using data from the RSS feed item (e.g., the article title or a summary generated by OpenAI). - Adjust any other parameters as required by the Leonardo AI API (e.g., image size, model).
- WordPress (Node - Missing in JSON, but implied by description):
- If a WordPress node is added later, configure it with your WordPress site
URLandCredentials(e.g., username and application password). - Map the output from the OpenAI node (blog post content) and the HTTP Request node (image URL) to the appropriate fields for creating a new post.
- If a WordPress node is added later, configure it with your WordPress site
-
Activate the Workflow:
- Once all nodes are configured, click the "Active" toggle in the top right corner of the workflow editor to enable it.
The workflow will now automatically run on your defined schedule, fetching news, generating content and images, and publishing to your WordPress blog.
Related Templates
Automate cancellation feedback collection with Stripe and Google Sheets
Who's it for This template is perfect for any SaaS business or subscription service using Stripe. Product managers, customer success teams, and founders can use this to automatically collect cancellation feedback without manual follow-up. Ideal for companies looking to reduce churn by understanding why customers leave. What it does When a customer cancels their Stripe subscription, this workflow instantly: Detects the cancellation via Stripe webhook Fetches customer details from Stripe API Sends a personalized feedback survey email with embedded customer information Logs all cancellations to Google Sheets for tracking Receives survey responses via webhook Automatically routes feedback to different Google Sheets based on reason (pricing concerns, feature requests, or other feedback) This organized approach helps you identify patterns in cancellations and prioritize improvements that matter most. How it works Stripe triggers the workflow when a subscription is canceled Customer data is fetched from the Stripe API (email, name, plan details) Personalized email is sent with a survey link containing customer data as URL parameters Cancellation is logged to a Google Sheets "Cancellations" tab When the customer submits the survey, a webhook receives the response Feedback is routed to dedicated sheets based on cancellation reason: Price Concerns → for pricing-related issues Feature Requests → for missing functionality Other Feedback → for everything else Set up steps Setup time: ~20 minutes Prerequisites Stripe account (test mode recommended for initial setup) Google account with Google Sheets Email service (Gmail, Outlook, or SMTP) Survey tool with webhook support (Tally or Typeform recommended) Configuration Stripe webhook: Copy the webhook URL from the "Stripe Subscription Canceled" node and add it to your Stripe Dashboard → Webhooks. Select the customer.subscription.deleted event. Email credentials: Configure Gmail, Outlook, or SMTP credentials in the "Send Feedback Survey Email" node. Update the fromEmail parameter. Survey form: Create a survey form with these fields: Hidden fields (auto-populated from URL): email, customer_id, name, plan Visible fields: reason dropdown ("Too Expensive", "Missing Features", "Other"), comments textarea Configure webhook to POST responses to the "Survey Response Webhook" URL Google Sheets: Create a spreadsheet with 4 sheets: "Cancellations", "Price Concerns", "Feature Requests", and "Other Feedback". Connect your Google account in the Google Sheets nodes. Survey URL: Replace [SURVEY_URL] in the email template with your actual survey form URL. Test: Use Stripe test mode to trigger a test cancellation and verify the workflow executes correctly. Requirements Stripe account with API access Google Sheets (free) Email service: Gmail, Outlook, or SMTP server Survey tool: Tally (free), Typeform (paid), or custom form with webhook capability n8n instance: Cloud or self-hosted How to customize Different surveys by plan: Add an IF node after getting customer details to send different survey links based on subscription tier Slack notifications: Add a Slack node after "Route by Feedback Type" to alert your team about price concerns in real-time Delayed email: Insert a Wait node before sending the email to give customers a 24-hour cooldown period CRM integration: Add nodes to sync cancellation data with your CRM (HubSpot, Salesforce, etc.) Follow-up workflow: Create a separate workflow that triggers when feedback is received to send personalized follow-up offers Custom routing logic: Modify the Switch node conditions to match your specific survey options or add more categories Tips for success Use Stripe test mode initially to avoid sending emails to real customers during setup Customize the email tone to match your brand voice Keep the survey short (2-3 questions max) for higher response rates Review feedback weekly to identify patterns and prioritize improvements Consider offering a discount or incentive for completing the survey
Generate verified job offer letters with OpenAI, Gmail and Slack
📄 AI-Powered Verified Job Offer Letter Generator Description Creating job offer letters manually is time-consuming, error-prone, and difficult to scale. This AI-powered workflow automates the entire job offer letter process — from validating candidate emails to generating and delivering professional PDF offer letters. This intelligent workflow eliminates repetitive drafting, reduces human errors, and ensures offer letters are sent only to verified email addresses, helping HR teams move faster while maintaining professionalism and accuracy. --- What This Workflow Does Transforms manual offer letter creation into a seamless, automated HR process: 📝 Capture Candidate & Job Details – Receives candidate name, email, job role, salary, joining date, and company details via webhook or form. 📧 Email Verification – Validates the candidate’s email address before sending any communication to prevent delivery errors. 🧠 AI-Powered Offer Letter Generation – Uses AI to generate a clear, professional, and structured job offer letter. 📄 HTML Offer Letter Formatting – Converts the AI-generated content into a clean and readable HTML layout. 📑 PDF Generation – Automatically converts the offer letter into a professional PDF document. 📧 Offer Letter Delivery – Sends the PDF offer letter directly to the verified candidate email. 🗂️ Document Storage – Saves a copy of the offer letter for internal records and future reference. 🔁 Confirmation Response – Returns a success response confirming completion. --- Key Features 🤖 AI Offer Letter Writing – Generates professional, ready-to-send offer letters automatically. 📧 Email Verification Built-In – Ensures offer letters are only sent to valid email addresses. 📑 PDF Generation – Creates clean, official-looking offer letters. ⚙️ End-to-End Automation – No manual drafting, formatting, or sending required. 📂 Centralized Record Keeping – Keeps copies of all generated offer letters. 🔄 Flexible Triggering – Can be triggered from HR systems, forms, or internal tools. --- Perfect For 🏢 HR & Recruitment Teams – Automate offer letter creation and delivery. 🚀 Startups & Growing Companies – Send professional offer letters without extra admin work. 🏫 Staffing & Hiring Agencies – Generate offer letters quickly for multiple candidates. 💻 Remote & Distributed Teams – Ensure consistent communication across locations. 🧠 Operations Teams – Maintain accurate records and reduce manual errors. --- What You’ll Need Required Integrations 🌐 Webhook Trigger – Receives candidate and job details. 🤖 OpenAI – Generates offer letter content. 📧 VerifyEmail – Validates candidate email addresses. 📄 HTMLCSS to PDF – Converts HTML into PDF offer letters. 📧 Gmail – Sends the offer letter email. ☁️ Google Drive (optional) – Stores generated offer letters. --- Optional Enhancements 🎨 Brand Customization – Add company logo, colors, and formatting to offer letters. 🧾 HR System Integration – Connect with ATS or HR tools for automatic triggering. 🌍 Multilingual Offer Letters – Generate offer letters in different languages. 🔐 Approval Step – Add internal approval before sending offer letters. 📊 Audit Logging – Store offer letter data in Google Sheets or databases. 📎 Additional Attachments – Include policies or onboarding documents with the offer letter. --- Quick Start 1️⃣ Import the workflow template into your n8n workspace 2️⃣ Connect credentials for OpenAI, VerifyEmail, Gmail, and HTMLCSS to PDF 3️⃣ Send test candidate data to the webhook 4️⃣ Review the generated PDF offer letter 5️⃣ Activate the workflow and start sending offer letters automatically --- Customization Options 1️⃣ Offer Letter Tone – Adjust AI prompt for formal or friendly tone. 2️⃣ Company Branding – Customize HTML layout and styling. 3️⃣ Email Content – Modify subject line and email message. 4️⃣ PDF Layout – Adjust spacing, fonts, and structure. 5️⃣ Storage Location – Change where offer letters are saved. 6️⃣ Validation Rules – Extend email or input checks. --- Expected Results ⚡ Faster Hiring Process – Generate offer letters in minutes. 🤖 Consistent Quality – Every offer letter follows a professional format. 📧 Error-Free Delivery – Verified emails reduce failed communication. 🗂️ Organized Records – All offer letters stored automatically. 🏢 Professional Candidate Experience – Clean, official documents every time. --- Workflow Structure Visualization 📝 Candidate & Job Details ↓ 📧 Email Verification ↓ 🧠 AI Offer Letter Generation ↓ 📄 HTML Formatting ↓ 📑 PDF Conversion ↓ 📧 Email Delivery ↓ 🔁 Confirmation Response --- 🚀 Ready to Automate Job Offer Letters? Import this template today and let AI handle offer letter creation, verification, and delivery — so your team can focus on hiring the right talent faster. ✨ ---
Track meal nutrition from meal photos with LINE, Google Gemini and Google Sheets
AI Meal Nutrition Tracker with LINE and Google Sheets Who's it for This workflow is designed for health-conscious individuals, fitness enthusiasts, and anyone who wants to track their daily food intake without manual calorie counting. It is best suited for users who want a simple, AI-powered meal logging system that analyzes food photos one at a time and provides instant nutritional feedback via LINE. What it does This workflow processes a single meal photo sent via LINE, analyzes it using Google Gemini AI to identify foods and estimate nutritional content, and stores the data in Google Sheets for tracking. The workflow focuses on simplicity and encouragement: it receives a meal image, performs AI-based food recognition, estimates calories and macronutrients, calculates a health score, provides personalized advice, and replies with a detailed nutritional breakdown on LINE. How it works A single meal photo is sent to the LINE bot. The workflow is triggered via a LINE webhook. The image file is downloaded and sent to Google Gemini AI for food analysis. The AI identifies foods and estimates nutritional values (calories, protein, carbs, fat, fiber). A health score (1-10) is calculated with personalized improvement tips. The data is appended to Google Sheets for meal history tracking. The image is uploaded to Google Drive for reference. A formatted nutritional report with advice is sent back as a LINE reply. This workflow is intentionally designed to handle one image per execution. Requirements To use this workflow, you will need: A LINE Messaging API account A Google Gemini API key A Google account with access to Google Sheets and Google Drive A Google Sheets document with the following column names: Date Time Meal Type Food Items Calories Protein (g) Carbs (g) Fat (g) Fiber (g) Health Score Advice Image URL Important limitations This workflow does not support multiple images sent in a single message. Sending images in quick succession may trigger multiple executions and lead to unexpected results. Only the first image in an event payload is processed. Nutritional values are AI estimates based on visual analysis and typical serving sizes. Accuracy depends on image quality, lighting, and food visibility. This tool should not replace professional dietary advice. These limitations are intentional to keep the workflow simple and easy to understand. How to set up Create a LINE Messaging API channel and obtain a Channel Access Token. Generate a Google Gemini API key. Update the Config node with your LINE token, Google Sheets ID, Google Drive folder ID, and daily calorie goal. Configure credentials for LINE, Google Gemini, Google Sheets, and Google Drive. Register the n8n webhook URL in your LINE channel settings. Activate the workflow in n8n and test it with a single meal photo. How to customize Modify the AI prompt in the "Analyze Meal with AI" node to support different languages or dietary frameworks (keto, vegan, etc.). Adjust the daily calorie goal in the Config node to match individual needs. Add additional nutritional fields such as sodium, sugar, or vitamins. Replace Google Sheets with a fitness app API or database. Integrate with other services to send daily/weekly nutrition summaries. --- Note: This workflow was tested using real meal photos sent individually via the LINE Messaging API. Nutritional estimates are approximations and may vary from actual values. For accurate dietary tracking, consult a registered dietitian.