Automated Email Replies with GPT-4o, Outlook, and GoToHuman Approval
This n8n workflow reads emails from your Outlook inbox, drafts AI-powered replies using OpenAI, and routes them through the gotoHuman node for human approval before replying automatically.
โ Key Features
Reads Outlook emails** from today only (excluding those from your own address). AI-generated replies** crafted using OpenAI based on the subject and body of the email. Community node integration**: Uses the gotoHuman node for human review and approval of replies before sending. Safe sending**: Only approved responses are automatically sent back via Outlook. Expandable**: Can be easily modified to: Send drafts instead of full replies Include additional email filters Trigger at intervals or via webhook
๐ง Nodes Used
Microsoft Outlook โ Fetch and reply to emails OpenAI โ Generates smart reply text gotoHuman โ Human-in-the-loop approval system Loop Over Items, IF, Code, and Set nodes for processing logic Manual Trigger โ For testing
๐ง Setup Instructions
- Connect APIs Outlook OAuth2**: Go to Azure Portal Register an app Add Mail.Read, Mail.Send scopes Set redirect URI: https://api.n8n.cloud/oauth2-credential/callback Paste credentials in n8n credential manager
OpenAI API**: Create account at OpenAI Create an API Key Add it to n8n credentials
gotoHuman API**: Go to https://gotoHuman.ai and sign in Create a review template (e.g., โEmail Responsesโ) Copy the Template ID and API key into n8n credentials
๐ช Workflow Steps Overview
-
Trigger
Use the Manual Trigger to test or schedule execution with a cron node. -
Filter Emails from Today A Code node outputs today's date in the proper yyyy-mm-dd format.
const today = new Date(); today.setHours(0, 0, 0, 0); return [{ json: { searchQuery: received:${today.toISOString().split('T')[0]} } }];
-
Search and Filter Outlook Messages Uses the Outlook node with a search query like:
received:2025-08-06 -from:rbreen@ynteractive.com (Update to your email) -
Generate AI Response Text prompt to OpenAI:
subject: {{ $json.subject }}
body: {{ $json.body.content }}
System prompt:
> You are a personal assistant helping respond to emails. I am an AI automation expert specializing in helping small and medium-size businesses automate processes. Create a short response to the email. Sign the email as Robert Breen.
-
Review with gotoHuman Submit AI output for human approval using the gotoHuman node. The output schema should match the Review Template fields (e.g., "email", "OriginalEmail").
-
IF Node Decision If status is approved, send reply If not, return to loop for revision or skip
โ๏ธ Customization Ideas
โ๏ธ Send only drafts by skipping the "reply" step and storing results. ๐ Schedule the workflow with a Cron trigger for automation. ๐ Add label filters or subject keywords for advanced targeting.
๐ External Links
gotoHuman Community Node OpenAI Microsoft Outlook API Setup
๐ฌ Need More Help?
If you'd like help customizing this or building similar automations, reach out:
Robert Breen
AI & Automation Consultant
๐ https://ynteractive.com
๐ง robert.j.breen@gmail.com
๐ LinkedIn
Related Templates
Instagram Full Profile Scraper with Apify and Google Sheets
๐ธ Instagram Full Profile Scraper with Apify and Google Sheets This n8n workflow automates the process of scraping ful...
Auto-classify Gmail emails with AI and apply labels for inbox organization
Who is this for? Professionals and individuals who receive high volumes of emails, those who want to automatically organ...
Compare Lists and Identify Common Items & Differences Using Custom Keys
This workflow compares two lists of objects (List A and List B) using a user-specified key (e.g. email, id, domain) and ...
๐ Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments