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

  1. 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

  1. Trigger
    Use the Manual Trigger to test or schedule execution with a cron node.

  2. 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]} } }];

  1. 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)

  2. 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.

  1. 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").

  2. 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

0
Downloads
3
Views
8.94
Quality Score
intermediate
Complexity
Author:Robert Breen(View Original โ†’)
Created:8/13/2025
Updated:11/30/2025

๐Ÿ”’ Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments