This workflow automatically generates draft replies in Gmail. It's designed for anyone who manages a high volume of emails or often face writer's block when crafting responses. Since it doesn't send the generated message directly, you're still in charge of editing and approving emails before they go out. How It Works: Email Trigger: activates when new emails reach the Gmail inbox Assessment: uses OpenAI gpt-4o and a JSON parser to determine if a response is necessary. Reply Generation: crafts a reply with OpenAI GPT-4 Turbo Draft Integration: after converting the text to html, it places the draft into the Gmail thread as a reply to the first message Set Up Overview (~10 minutes): OAuth Configuration (follow n8n instructions here): Setup Google OAuth in Google Cloud console. Make sure to add Gmail API with the modify scope. Add Google OAuth credentials in n8n. Make sure to add the n8n redirect URI to the Google Cloud Console consent screen settings.
Tags
Related workflows
See all AI Automation→Force AI to use a specific output format
This workflow is for anyone looking to automatically fetch, validate, and parse complex language-based queries into a structured format. Its unique capability lies in not only processing language but also fixing invalid outputs before structuring them. Note that to use this template, you need to be on n8n version 1.19.4 or later.
Audit landing page CRO and log results with OpenAI and Data Tables
Quick overview This workflow collects a landing page URL, scrapes its HTML, and uses OpenAI to generate a structured conversion-rate-optimization (CRO) audit with scores and prioritized tips, then renders a styled report in the browser and logs each audit to an n8n Data Table. How it works Presents an n8n Form where the user submits a landing page URL. Fetches the landing page HTML via an HTTP request with retries, and routes to an error page if the URL can’t be retrieved. Sends the scraped HTML and URL to OpenAI to produce a CRO audit including an overall score, category scores, a written roast, and a ranked list of optimization tips. Uses a structured output parser with an OpenAI “fixer” model to validate and auto-correct the AI response into the required JSON schema. Builds a styled HTML report from the structured audit results. Logs the audit metadata (URL, score, verdict, summary, language, timestamp) to an n8n Data Table and displays the report back in the user’s browser. Setup Add an OpenAI API credential and select it for both the main OpenAI model and the output-fixer model. Create or select an n8n Data Table (for example, “CRO Audit Log”) and map the columns used for url,
Analyze YouTube comments with OpenAI, Google Sheets, and Gmail
Quick overview This workflow monitors a Google Sheets list of YouTube video IDs, fetches video details and top comments from the YouTube Data API, analyzes the comments with OpenAI into structured sentiment and themes, emails an HTML report via Gmail, and writes the results back to Google Sheets. How it works Triggers every minute when a row in Google Sheets is added or updated. Reads the video ID and status from the row and continues only if the status is set to “Pending”. Calls the YouTube Data API to fetch the video’s metadata and the top comment threads for that video. Flattens the comment threads, calculates basic stats (comment count and average likes), and compiles a limited comment text block for analysis. If comments exist, sends the compiled comments and video title to OpenAI to generate a structured analysis (sentiment score, sentiment breakdown, themes, questions, feedback, insights, and summary). Builds an HTML email report from the structured results, sends it to the configured recipient with Gmail, and updates the Google Sheet row with the analysis fields; if no comments exist, marks the row as “No comments”. Setup Create or duplicate a Google Sheet with at least “Vi