by darrell_tw
Water Reminder Workflow This workflow demonstrates how to use n8n and Slack to build an intelligent water drinking reminder system, combined with Google Sheets for data recording and OpenAI for generating personalized reminder messages. Google Sheet Template The iOS shortcut template: The result in iOS health: The template demo in Youtube Key Features Scheduled Reminders: Automatically sends water reminders at random times every hour. Intelligent Scheduling: Delays the next reminder if you've recently had water. AI-Generated Messages: Uses OpenAI to generate friendly and non-repetitive reminder messages. Data Tracking: Records daily water intake and calculates percentage of goal achievement. Quick Response: Easily record water intake through Slack buttons. iOS Integration: Provides iOS shortcut links to sync data with the Health app. Pre-Configuration Requirements To use this workflow, you need to set up the following: Google Sheets: Create a Google spreadsheet with log and setting sheets The log sheet should include date, time, and value columns The setting sheet is used to store daily water intake goals Slack: Create a Slack app and obtain an API token Configure permissions for interactive buttons OpenAI: Obtain an OpenAI API key iOS Shortcut (optional): Create an iOS shortcut named darrell_water for recording health data Node Configurations 1. Scheduled Triggers and Data Collection 1.1. Schedule Trigger Purpose**: Triggers water reminders on schedule Configuration**: Cron Expression: 0 {{ Math.floor(Math.random() * 11) }} 8-23 * * * Triggers at a random minute every hour, only between 8 AM and 11 PM 1.2. Google Sheets - Get Target Purpose**: Retrieves daily water intake goal Configuration**: Document ID: Your Google spreadsheet ID Sheet Name: setting 1.3. Google Sheets - Get Log Purpose**: Retrieves today's water intake records Configuration**: Document ID: Your Google spreadsheet ID Sheet Name: log Filter Condition: date equals today's date {{ $now.format('yyyy-MM-dd') }} 1.4. Summarize Purpose**: Calculates total water intake for today Configuration**: Fields to Summarize: value (sum) 1.5. Limit Purpose**: Gets the most recent water intake record Configuration**: Keep: Last items 2. Intelligent Reminder Logic 2.1. Combine Data Purpose**: Merges target and actual water intake data Configuration**: Combine By: Combine by position Number of Inputs: 3 2.2. If Purpose**: Checks if water was consumed recently Configuration**: Condition: {{ DateTime.fromISO($json.date+"T"+$json.time).format('yyyy-MM-dd HH:mm:ss') }} is after {{ $now.minus(30, "minutes") }} 2.3. Wait Purpose**: Randomly delays the reminder if water was consumed recently Configuration**: Wait Time: {{ Math.floor(Math.random() * 1) + 1 }} minutes 3. AI Message Generation and Sending 3.1. OpenAI Purpose**: Generates personalized water reminder messages Configuration**: Model: gpt-4o-mini Messages: System prompt: Requests responses in Traditional Chinese and in JSON format User prompt: Includes information about last water time, current time, goal, and progress Temperature: 1 3.2. Slack Send Drink Notification Purpose**: Sends water reminders to Slack channel Configuration**: Channel: Your Slack channel ID Message Type: Block Block UI: Contains AI-generated reminder message and water amount buttons (100ml, 150ml, 200ml, 250ml, 300ml) 4. User Interaction and Data Recording 4.1. Slack Drink Webhook Purpose**: Receives user interactions when water buttons are clicked Configuration**: HTTP Method: POST Path: slack-water-webhook 4.2. Slack Action Payload Purpose**: Parses Slack interaction data Configuration**: Mode: Raw JSON Output: {{ $json.body.payload }} 4.3. Slack Action Drink Data Purpose**: Extracts water amount and message information Configuration**: Assignments: value: {{ $json.actions[0].value }} message_text: {{ $json.message.text }} shortcut_url: shortcuts://run-shortcut?name=darrell_water&input= shortcut_url_data: JSON containing water amount and time message_ts: {{ $json.container.message_ts }} 4.4. Google Sheets Purpose**: Records water intake data to spreadsheet Configuration**: Operation: Append Document ID: Your Google spreadsheet ID Sheet Name: log Column Mapping: date: {{ $now.format('yyyy-MM-dd') }} time: {{ $now.format('HH:mm:ss') }} value: {{ $json.value }} 4.5. Send to Slack with Confirm Purpose**: Sends confirmation message and provides iOS shortcut link Configuration**: Channel: Your Slack channel ID Message Type: Block Block UI: Contains confirmation message and iOS Health app button Reply Settings: Reply to the thread of the original message Author Information This workflow was created by darrell_tw_, an engineer focused on AI and Automation. Contact: X Threads Instagram Website
by n8n Team
This workflow demonstrates how to connect an open-source model to a Basic LLM node. The workflow is triggered when a new manual chat message appears. The message is then run through a Language Model Chain that is set up to process text with a specific prompt to guide the model's responses. Note that open-source LLMs with a small number of parameters require slightly different prompting with more guidance to the model. You can change the default Mistral-7B-Instruct-v0.1 model to any other LLM supported by HuggingFace. You can also connect other nodes, such as Ollama. Note that to use this template, you need to be on n8n version 1.19.4 or later.
by Wan Dinie
AI Content Generator with Auto Pexels Image Matching This n8n template demonstrates how to use AI to generate engaging content and automatically find matching royalty-free images based on the content context. Use cases are many: Try creating blog posts with hero images, generating social media content with visuals or drafting email newsletters with relevant photos. Good to know At time of writing, Pexels offers free API access with up to 200 requests per hour. See Pexels API for updated info. OpenAI API costs vary by model. GPT-4.1 mini is cheaper while normal GPT-4.1 and above offer deeper content generation but cost more per request. Using the floating JavaScript node can reduce token usage by processing content and keyword extraction in a single prompt. How it works We'll collect a content topic or idea via a manual form trigger. OpenAI generates initial content based on your input topic. The AI extracts suitable keywords from the generated content to find matching images. The keywords are sent to Pexels API, which searches for relevant royalty-free stock images. OpenAI creates the final polished content that complements the selected image. The result is displayed as a formatted HTML template combining content and image together. How to use The manual trigger node is used as an example, but feel free to replace this with other triggers such as webhook or even a form. You can batch-generate multiple pieces of content by looping through a list, but of course, the processing will take longer and cost more. Requirements OpenAI API key (get one at https://platform.openai.com) Pexels API key (get free access at https://www.pexels.com/api) Valid content topics or ideas to generate from Customizing this workflow Optimize token usage**: Connect the floating "Extract Content and Image Keyword" JavaScript node to process everything in one prompt and minimize API costs. If you use this option, update the expressions in the "Pexels Image Search" node and "Create Suitable Content Including Image" node to reference the extracted keywords from the JS node. Upgrade to GPT-4.1, GPT-5.1, or GPT-5.2 for more advanced and creative content generation. Change the HTML template output to other formats like Markdown, plain text, or JSON for different publishing platforms. For long term, store the results in a database like Supabase or Google Sheets if you are planning to reuse the contents.
by Anthony
How It Works This workflow transforms any webpage into an AI-narrated audio summary delivered via WhatsApp: Receive URL - WhatsApp Trigger captures incoming messages and passes them to URL extraction Extract & validate - Code node extracts URLs using regex and validates format; IF node checks for errors User feedback - Sends either error message ("Please send valid URL") or processing status ("Fetching and analyzing... 10-30 seconds") Fetch webpage - Sub-workflow calls Jina AI Reader (https://r.jina.ai/) to fetch JavaScript-rendered content, bypassing bot blocks Summarize content - GPT-4o-mini processes webpage text in 6000-character chunks, extracts title and generates concise summary Generate audio - OpenAI TTS-1 converts summary text to natural-sounding audio (Opus format for WhatsApp compatibility) Deliver result - WhatsApp node sends audio message back to user with summary Why Jina AI? Many modern websites (like digibyte.io) require JavaScript to load content. Standard HTTP requests only fetch the initial HTML skeleton ("JavaScript must be enabled"). Jina AI executes JavaScript and returns clean, readable text. Setup Steps Time estimate: ~20-25 minutes 1. WhatsApp Business API Setup (10-15 minutes) Create Meta Developer App** - Go to https://developers.facebook.com/, create Business app, add WhatsApp product Get Phone Number ID** - Use Meta's test number or register your own business phone Generate System User Token** - Create at https://business.facebook.com/latest/settings/system_users (permanent token, no 4-hour expiry) Configure Webhook** - Point to your n8n instance URL, subscribe to "messages" events Verify business** - Meta requires 3-5 verification steps (business, app, phone, system user) 2. Configure n8n Credentials (5 minutes) OpenAI** - Add API key in Credentials → OpenAI (used in 2 places: "Convert Summary to Audio" and "OpenAI Chat Model" in sub-workflow) WhatsApp OAuth** - Add in WhatsApp Trigger node using System User token from step 1 WhatsApp API** - Add in all WhatsApp action nodes (Send Error, Send Processing, Send Audio) using same token 3. Link Sub-Workflow (3 minutes) Ensure "[SUB] Get Webpage Summary" workflow is activated In "Get Webpage Summary" node, select the sub-workflow from dropdown Verify workflow ID matches: QglZjvjdZ16BisPN 4. Update Phone Number IDs (2 minutes) Copy your Phone Number ID from Meta console Update in all WhatsApp nodes: Send Error Message, Send Processing Message, Send Audio Summary 5. Test the Flow (2 minutes) Activate both workflows (sub-workflow first, then main) Send test message to WhatsApp: https://example.com Verify: Processing message arrives → Audio summary delivered within 30 seconds Important Notes WhatsApp Caveats: 24-hour window** - Can't auto-message users after 24 hours unless they message first (send "Hi" each morning to reset) Verification fatigue** - Meta requires multiple business verifications; budget 30-60 minutes if first time Test vs Production** - Test numbers work for single users; production requires business verification Audio Format: Using Opus codec (optimal for WhatsApp, smaller file size than MP3) Speed set to 1.0 (normal pace) - adjust in "Convert Summary to Audio" node if needed Cost: ~$0.015 per minute of audio generated Jina AI Integration: Free tier** works for basic use (no API key required) Handles JavaScript-heavy sites automatically Add Authorization: Bearer YOUR_KEY header for higher limits Alternative: Replace with Playwright/Puppeteer for self-hosted rendering Cost Breakdown (per summary): GPT-4o-mini summarization: ~$0.005-0.015 OpenAI TTS audio: ~$0.005-0.015 WhatsApp messages: Free (up to 1,000/month) Total: ~$0.01-0.03 per summary** Troubleshooting: "Cannot read properties of undefined" → Status update, not message (code node returns null correctly) "JavaScript must be enabled" → Website needs Jina AI (already implemented in Fetch site texts node) Audio not sending → Check binary data field is named data in TTS node No webhook received → Verify n8n URL is publicly accessible and webhook subscription includes "messages" Pro Tips: Change voice in TTS node: alloy (neutral), echo (male), nova (female), shimmer (soft) Adjust summary length: Modify chunkSize: 6000 in sub-workflow's Text Splitter node (lower = faster but less detailed) Add rate limiting: Insert Code node after trigger to track user requests per hour Store summaries: Add database node after "Clean up" to archive for later retrieval The Use Cases: Executive commuting - Consume industry news hands-free Research students - Cover 3x more sources while multitasking Visually impaired - Access any webpage via natural audio Sales teams - Research prospects on the go Content creators - Monitor competitors while exercising
by Amit Mehta
N8N Workflow: Printify Automation - Update Title and Description - AlexK1919 This workflow automates the process of getting products from Printify, generating new titles and descriptions using OpenAI, and updating those products. How it Works This workflow automatically retrieves a list of products from a Printify store, processes them to generate new titles and descriptions based on brand guidelines and custom instructions, and then updates the products on Printify with the new information. It also interacts with Google Sheets to track the status of the products being processed. The workflow can be triggered both manually or by an update in a Google Sheet. Use Cases E-commerce Automation**: Automating content updates for a Printify store. Marketing & SEO**: Generating SEO-friendly or seasonal content for products using AI. Product Management**: Batch-updating product titles and descriptions without manual effort. Setup Instructions Printify API Credentials: Set up httpHeaderAuth credentials for Printify to allow the workflow to get and update products. OpenAI API Credentials: Provide an API key for OpenAI in the openAiApi credentials. Google Sheets Credentials: The workflow requires two separate Google Sheets credentials: one for the trigger (googleSheetsTriggerOAuth2Api) and another for appending/updating data (googleSheetsOAuth2Api). Google Sheets Setup: You need a Google Sheet to store product information and track the status of the updates. The workflow is linked to a specific spreadsheet. Brand Guidelines: The Brand Guidelines + Custom Instructions node must be updated with your specific brand details and any custom instructions for the AI. Workflow Logic Trigger: The workflow can be triggered manually or by an update in a Google Sheet when the upload column is changed to "yes". Get Product Info: It fetches the shop ID and then a list of all products from Printify. Process Products: The product data is split, and the workflow loops through each product. AI Content Generation: For each product, the Generate Title and Desc node uses OpenAI to create a new title and description based on the original content, brand guidelines, and custom instructions. Google Sheets Update: The workflow appends the product information and a "Product Processing" status to a Google Sheet. It then updates the row with the newly generated title and description, and changes the status to "Option added". Printify Update: The Printify - Update Product node sends a PUT request to the Printify API to apply the new title and description to the product. Node Descriptions | Node Name | Description | |-----------|-------------| | When clicking 'Test workflow' | A manual trigger for testing the workflow. | | Google Sheets Trigger | An automated trigger that starts the workflow when the upload column in the Google Sheet is updated. | | Printify - Get Shops | Fetches the list of shops associated with the Printify account. | | Printify - Get Products | Retrieves all products from the specified Printify shop. | | Brand Guidelines + Custom Instructions | A Set node to store brand guidelines and custom instructions for the AI. | | Generate Title and Desc | An OpenAI node that generates a new title and description based on the provided inputs. | | GS - Add Product Option | Appends a new row to a Google Sheet to track the processing status of a product. | | Update Product Option | Updates an existing row in the Google Sheet with the new product information and status. | | Printify - Update Product | A PUT request to the Printify API to update a product with new information. | Customization Tips You can swap out the Printify API calls with similar services like Printful or Vistaprint. Modify the Brand Guidelines + Custom Instructions node to change the brand name, tone, or specific instructions for the AI. Change the number of options the workflow should generate by modifying the Number of Options node. You can change the OpenAI model used in the Generate Title and Desc node, for example, from gpt-4o-mini to another model. Suggested Sticky Notes for Workflow "Update your Brand Guidelines before running this workflow. You can also add custom instructions for the AI node." "You can swap out the API calls to similar services like Printful, Vistaprint, etc." "Set the Number of Options you'd like for the Title and Description" Required Files 1V1gcK6vyczRqdZC_Printify_Automation_-Update_Title_and_Description-_AlexK1919.json: The main n8n workflow export for this automation. The Google Sheets template for this workflow. Testing Tips Run the workflow with the manual trigger to see the flow from start to finish. Change the upload column in the Google Sheet to "yes" to test the automated trigger. Verify that the new titles and descriptions are correctly updated on Printify. Suggested Tags & Categories Printify OpenAI
by Cheng Siong Chin
How It Works This workflow automates end-to-end real estate investment analysis by aggregating data from multiple sources and applying AI-driven evaluation. It is designed for real estate investors, analysts, and portfolio managers seeking data-backed decisions without manual research overhead. The solution addresses the time-consuming challenge of collecting and analyzing fragmented real estate data—such as MLS listings, public records, demographic trends, and macroeconomic indicators—and transforms it into actionable insights using AI. Data is collected in parallel across four streams: MLS property data, public records, demographic information, and macroeconomic signals. These streams are consolidated into a unified dataset and processed by OpenAI GPT-4, using calculator tools and structured output parsing for quantitative analysis. Setup Steps Configure HTTP nodes with your MLS API, public records service Add OpenAI API key in Chat Model node credentials Connect Gmail account for acquisition team notifications Integrate Slack workspace and specify investor notification channel Set schedule trigger frequency in Schedule node for desired analysis cadence Prerequisites OpenAI API key, MLS data service access, public records API credentials Use Cases Real estate investment firms screening multiple markets simultaneously Customization Modify AI prompts to adjust investment criteria priorities, add custom financial metrics Benefits Reduces investment analysis time from hours to minutes, eliminates manual data aggregation errors
by Abdul Mir
Overview Automate your entire LinkedIn content machine — from research and image generation to scheduling and posting — with this AI-powered workflow. This workflow pulls in past content ideas, researches new ones using Perplexity, generates a new post (with image) using your brand's voice and style, saves the output to Google Sheets, and auto-posts twice a week to LinkedIn. It’s perfect for founders, creators, and marketers who want to stay consistent on LinkedIn without manually writing or designing every post. Who’s it for Solo founders or marketers building a LinkedIn presence Content creators growing their audience Agencies managing client content calendars Anyone who wants to post consistently without spending hours on content How it works Pulls old ideas from a Google Sheet Schedules content creation using n8n’s cron node Uses Perplexity to research current topics and trends Feeds the data into an AI agent (like Claude or GPT) to generate post copy Creates a branded image using a reference style and OpenAI’s image model Saves post content + image URL into Google Sheets Twice a week, selects one ready post, downloads the image, and publishes it to LinkedIn How to set up Add your Google Sheet ID and column names for posts Connect your OpenAI (or Claude) and Perplexity API keys Upload a brand-style reference image to Google Drive Configure your LinkedIn account and connect the node Adjust the cron schedule for both post creation and auto-posting (Optional) Edit the AI prompt to match your personal voice or niche Requirements Google Drive & Sheets access OpenAI or Claude API key Perplexity API key LinkedIn credentials (via n8n’s LinkedIn integration) How to customize Change the prompt for the AI to fit your voice or audience Swap out Perplexity for another research method Adjust how often you want posts scheduled or published Swap LinkedIn for Twitter, Slack, or another platform Add Notion or Airtable as your CMS backend
by Trung Tran
📄 Auto Extract Contacts from Business Cards to Sheet With GPT4o > This smart workflow extracts names, phone numbers, emails, and more from uploaded name card photos using AI, then logs them neatly into your Google Sheet. No typing. No mess. Just upload and go. 👤 Who’s it for Sales & Business Development Teams Recruiters & Talent Acquisition Specialists Event Teams collecting business cards Admins who manage contact databases manually ⚙️ How it works / What it does This workflow automates the extraction of contact details from uploaded name card (business card) images and stores them in a structured Google Sheet for easy tracking and follow-up. Workflow Steps: User uploads one or more name card images through a web form. The uploaded files are saved to a Google Drive folder for archiving. A smart AI agent (with OCR and GPT capabilities) scans each image and extracts relevant contact data into structured JSON format. Data is transformed, cleaned (e.g., removing + from phone numbers), and filtered. Valid contacts are appended to a Google Sheet for central tracking and future use. 🛠 How to set up Create a Form Allow file upload (JPG/PNG format). Label it as “Name Card Uploader” with a clear description. Upload to Google Drive Use the Google Drive node to store uploaded images. Configure Smart Agent Use GPT-4o or similar model with OCR capability. Apply a structured output parser to extract contact fields like name, phone, email, company, etc. Transform Data Use the Code node to clean and structure contact info. Strip out unwanted characters from phone numbers (e.g., +). Filter Invalid Records Remove entries with no meaningful contact data. Append to Google Sheets Use the Google Sheets node with "Append Sheet Row". Map fields to columns like Name, Phone, Email, etc. ✅ Requirements n8n workflow environment Google Drive integration (for file storage) Google Sheets integration (for storing contacts) GPT-4o or any image-capable LLM Clear name card images (PNG/JPG, readable text) (Optional) Slack/email integration for notifications 🧩 How to customize the workflow CRM Sync**: Connect to platforms like HubSpot, Salesforce, or Zoho. Validation Logic**: Ensure records contain key fields like name or email before writing. Uploader Info**: Attach submitter metadata to each contact record. Language Adaptation**: Adjust extracted field labels/output to target your preferred language. Batch Upload**: Handle multiple cards in a single image or multiple uploads in one go.
by Kirill Khatkevich
This workflow transforms raw Meta Ads data into actionable, expert-level insights. It acts as a virtual performance marketer, analyzing each creative's performance, comparing it against your historical benchmarks, and delivering clear recommendations on whether to scale, optimize, or stop the ad. By running parallel analyses with both OpenAI and Gemini, it provides a unique, dual-perspective evaluation. This template is the perfect sequel to our "Automation of Creative Testing" workflow but also works powerfully on its own. Use Case Manually sifting through ads manager reports is tedious, and identifying true winners from early data is challenging. This workflow solves these problems by automating the entire analysis pipeline. It's designed for performance marketing teams who need to: Make faster, data-driven decisions on which creatives to scale. Get objective, AI-powered second opinions on ad performance. Systematically evaluate creatives against consistent, pre-defined benchmarks. Maintain a central log in Google Sheets with both raw metrics and qualitative AI analysis. Save hours spent on manual data crunching and report generation. How it Works The workflow is structured into three logical stages: Configuration & Data Ingestion: A central ⚙️ Set parameters node holds all key variables: the data source (Meta or Sheets), campaign_id, and, most importantly, your historical performance benchmarks as a simple text block. An IF node directs the workflow to fetch data either directly from a Meta Ads campaign or from a specified Google Sheet (ideal for analyzing a curated list of ads). Data Processing & AI Analysis (Parallel Execution): After fetching raw performance data (spend, impressions, clicks, actions), the workflow splits into three parallel branches for maximum resilience: Branch 1 (Data Logging): Immediately writes or updates a row in Google Sheets with the raw metrics for the creative. This ensures no data is lost, even if the AI analysis fails. Branch 2 (OpenAI Analysis): Prepares a CSV string of the creative's data, sends it along with the benchmarks to an OpenAI model (e.g., GPT-4), and instructs it to return a structured JSON analysis. Branch 3 (Gemini Analysis): Performs the exact same process but using Google's Gemini model via a LangChain agent, providing a second, independent evaluation. Results Aggregation: The results from both AI models are received as structured JSON. Two final Google Sheets nodes take these results and update the original row (matching by AdID), adding the evaluation, significance, summary, and recommendation into separate columns. The final sheet contains a complete picture: raw data side-by-side with analyses from two different AIs. Setup Instructions Credentials: 1.1 Connect your Meta Ads account. 1.2 Connect your Google account (for Sheets). 1.3 Connect your OpenAI account. 1.4 Connect your Google Gemini (Palm) account. The ⚙️ Set parameters Node: This is the central control panel. Open this first Set node and customize it: source: Set to "Meta" to pull from a campaign or "sheets" to read from a Google Sheet. campaign_id: If source is "Meta", enter your Meta Campaign ID here. benchmarks_data: This is critical. Paste your own historical performance data here as a CSV-formatted text block. The template includes an example. For best results, use an export from Ads Manager of your top-performing creatives, including key metrics. Google Sheets Nodes: There are three Google Sheets nodes that write data. You need to configure all of them to point to the same spreadsheet and sheet. Ad metrics (for raw metrics): Select your spreadsheet and sheet. Ensure "Operation" is set to Append or Update. Ad data from OpenAI (for OpenAI results): Select the same spreadsheet/sheet. Set "Operation" to Update. Ad data from Gemini (for Gemini results): Select the same spreadsheet/sheet. Set "Operation" to Update. Make sure your sheet has columns for all the data fields, e.g., AdID, FileName, spend, impressions, evaluation, summary, recommendation, evaluation G, summary G, etc. Activate the Workflow: Set your desired frequency in the Schedule Trigger node. Save and activate the workflow. Further Ideas & Customization This powerful analysis engine can be extended even further: Add a "Decision" Node: After the AI analyses are logged, add a final step that compares their recommendations. If both AIs say "scale", automatically increase the ad's budget via the Meta Ads API. Create Summary Reports: Add a branch that, after all ads are processed, calculates an overall summary (e.g., "3 creatives recommended for scaling, 5 for stopping") and sends it to a Slack channel. Dynamic Benchmarks: Instead of pasting benchmarks into the Set node, create a step that reads them from a dedicated "Benchmarks" tab in your Google Sheet, making them even easier to update. Experiment with Prompts and Benchmarks: The quality of the AI analysis is highly dependent on the quality of your input. Don't be afraid to: -- Refine the prompts in the AI Agent and Message a model nodes to better match your specific business context and KPIs. -- Curate your benchmarks_data. Test different sets of benchmark data (e.g., "last 30 days top performers" vs. "all-time best") to see how it influences the AI's recommendations. Finding the right combination of prompt and data is key to unlocking the most effective insights.
by Arthur Dimeglio
What this workflow does Automatically: fetches fresh news, filters out aggregators/PR wires and duplicates, writes a human-sounding LinkedIn post with GPT, downloads the article image to verify it’s usable, publishes to LinkedIn (with or without media), and logs the posted titles in Firestore to avoid re-posting. Runs on a daily schedule (cron) and supports two post variants: • Case 1: article has a description → richer post • Case 2: no description → short, still human and casual ⸻ How it works (high level flow) • Schedule Trigger (0 10,12,19,21 * * *): runs at 10:00, 12:00, 19:00, 21:00 (server timezone). • Firestore (Get Previous News Titles): loads previously posted titles (document asma/x20) to de-dupe. • HTTP Request (API NEWS): calls newsapi.org with query “AI Startup” for example, last 24–48h window, searchIn=title, sorted by publishedAt. • Code: Select Articles: • excludes Biztoc and common aggregators/PR wires (Techmeme, TheFly, PRNewswire, GlobeNewswire, MarketWatch press-releases, Medium, Substack, Yahoo consent, etc.), • requires valid URL + image, • groups by topic (normalized title + domain) and picks the best representative, • sorts by recency and returns up to 10 unique articles. • IF (URL & De-dupe checks): ensures link present and not already posted (compares against Firestore titles). • IF (Description Checker): branches on presence of description. • LLM Agents (2 prompts): generate a casual, human LinkedIn post in English (no emojis/links/markdown, 2–3 hashtags). • Post setup: cleans the text, passes the image URL forward. • HTTP Request (Image Downloader): retrieves the image as a file to confirm the link works. • LinkedIn Publisher: • If image OK → posts with media. • Otherwise → posts text-only. • Time Checkers + Firestore Upserts: after a successful publish, writes the article’s title to Firestore (asma/x20 fields title10, title12, title19, title21) so it won’t be posted again at other times. ⸻ Credentials & prerequisites • NewsAPI.org: API key (free tier works to start; mind rate limits). • LinkedIn OAuth2: connected account with permission to create posts on your profile (uses “Person” target in the node). • Google Firebase (Firestore): Service Account with read/write to the asma collection. The workflow uses document ID x20. ⸻ Setup (5 minutes) Import the workflow and open it in n8n. In API NEWS, set your NewsAPI key in the query param apiKey. In Get Previous News Titles and Firebase Article Saver [1–8], attach your Google Service Account and confirm projectId, collection=asma. In LinkedIn Publisher [1–4], attach your LinkedIn OAuth credential and ensure the Person is your profile URN. (Optional) Adjust the cron in Hourly trigger (server timezone). (Optional) Change the search query (q=AI startup), language, or time window in API NEWS. Enable the workflow. ⸻ Customization tips • Search scope: edit q, language, from/to in API NEWS to cover your niche. • Aggregator policy: tweak the aggregatorDomains set in the Select Articles code node. • Post voice: modify the LLM prompt (keeps the “human, slightly messy” tone). • Hashtags: the prompt ends with 2–3 simple tags (#AI #Startups #Innovation) — change as you like. • Posting times: change the cron or the downstream time-checker logic to map specific titles → time slots. • No-image fallback: text-only path is already handled; replace with a placeholder image if you prefer always-with-media. ⸻ Notes & constraints • Timezone: Schedule Trigger uses the n8n server timezone; adjust if your LinkedIn audience is elsewhere. • De-dupe: this template stores last posted titles in one Firestore doc (asma/x20) under title10, title12, title19, title21. You can change the schema or keep a rolling history. • Filtering: items missing URL or image are skipped by design. Yahoo consent pages are also skipped. • LLM costs: posts are short; usage is modest, but keep an eye on your OpenAI billing. • NewsAPI limits: free plans throttle requests; consider caching or widening the time window if you hit limits. ⸻ Troubleshooting • Nothing posts: check NewsAPI quota/response, then see the URL checker and Description Checker branches. • Image errors: some sites block hotlinking; the image download step will fall back to text-only posting. • Duplicates appeared: verify Firestore upserts executed after posting and that your comparison uses the right fields. • Wrong hours: confirm your n8n instance timezone and the cron expression. ⸻ Why this template You get a robust “news → LinkedIn” autoposter that feels authentically human (no corporate vibes), avoids low-quality aggregators, prevents duplicates, and gracefully handles media — all with clean, modular nodes that are easy to tweak.
by Muhammad Farooq Iqbal
Google NanoBanana Model Image Editor for Consistent AI Influencer Creation with Kie AI Image Generation & Enhancement Workflow This n8n template demonstrates how to use Kie.ai's powerful image generation models to create and enhance images using AI, with automated story creation, image upscaling, and organized file management through Google Drive and Sheets. Use cases include: AI-powered content creation for social media, automated story visualization with consistent characters, marketing material generation, and high-quality image enhancement workflows. Good to know The workflow uses Kie.ai's google/nano-banana-edit model for image generation and nano-banana-upscale for 4x image enhancement Images are automatically organized in Google Drive with timestamped folders Progress is tracked in Google Sheets with status updates throughout the process The workflow includes face enhancement during upscaling for better portrait results All generated content is automatically saved and organized for easy access How it works Project Setup: Creates a timestamped folder structure in Google Drive and initializes a Google Sheet for tracking Story Generation: Uses OpenAI GPT-4 to create detailed prompts for image generation based on predefined templates Image Creation: Sends the AI-generated prompt along with 5 reference images to Kie.ai's nano-banana-edit model Status Monitoring: Polls the Kie.ai API to monitor task completion with automatic retry logic Image Enhancement: Upscales the generated image 4x using nano-banana-upscale with face enhancement File Management: Downloads, uploads, and organizes all generated content in the appropriate Google Drive folders Progress Tracking: Updates Google Sheets with status information and image URLs throughout the entire process Key Features Automated Story Creation**: AI-powered prompt generation for consistent, cinematic image creation Multi-Stage Processing**: Image generation followed by intelligent upscaling Smart Organization**: Automatic folder creation with timestamps and file management Progress Tracking**: Real-time status updates in Google Sheets Error Handling**: Built-in retry logic and failure state management Face Enhancement**: Specialized enhancement for portrait images during upscaling How to use Manual Trigger: The workflow starts with a manual trigger (easily replaceable with webhooks, forms, or scheduled triggers) Automatic Processing: Once triggered, the entire pipeline runs automatically Monitor Progress: Check the Google Sheet for real-time status updates Access Results: Find your generated and enhanced images in the organized Google Drive folders Requirements Kie.ai Account**: For AI image generation and upscaling services OpenAI API**: For intelligent prompt generation (GPT-4 mini) Google Drive**: For file storage and organization Google Sheets**: For progress tracking and status monitoring Customizing this workflow This workflow is highly adaptable for various use cases: Content Creation**: Modify prompts for different styles (fashion, product photography, architectural visualization) Batch Processing**: Add loops to process multiple prompts or reference images Social Media**: Integrate with social platforms for automatic posting E-commerce**: Adapt for product visualization and marketing materials Storytelling**: Create sequential images for visual narratives or storyboards The modular design makes it easy to add additional processing steps, change AI models, or integrate with other services as needed. Workflow Components Folder Management**: Dynamic folder creation with timestamp naming AI Integration**: OpenAI for prompts, Kie.ai for image processing File Processing**: Binary handling, URL management, and format conversion Status Tracking**: Multi-stage progress monitoring with Google Sheets Error Handling**: Comprehensive retry and failure management systems
by Jannik Hiller
How it works Automates systematic literature review by downloading papers from Google Drive, extracting text, and evaluating them against strict inclusion/exclusion criteria using LLM agents Routes included papers to Qdrant vector stores with Gemini embeddings for semantic search, and excluded papers to a separate folder Logs all decisions to Airtable with PRISMA-compliant justification for complete audit trails Set up steps Connect Google Drive credentials to access your paper folder Configure Airtable base and table for decision logging Add OpenAI (GPT-4) and Google Gemini API credentials for LLM evaluation and embeddings Set up Qdrant instances for vector storage (supports up to 3 collections) Keep detailed descriptions of your inclusion/exclusion criteria in the sticky notes inside your workflow