n8n and workflows

n8n with Outlook and Microsoft 365: automate email in your office

Reading time
12 minutes
Updated
Published
Topic guide
n8n automation
Written by
modernagents editorial teammodernagents is an AI automation agency from Austria for SMEs, based in the Vienna region.
AI-generated image: Mail processing machine with an indigo side casing on brushed aluminium

You may be thinking about connecting n8n with Outlook and Microsoft 365 because your office does the same thing every morning. Someone opens one email after another in the service mailbox, looks for the job number and saves the attachments with the right customer. It takes time, and now and then a photo can land with the wrong job or get lost.

n8n is a program that handles work steps between your programs, such as reading Outlook email, filing attachments and preparing reply drafts. Start with one mailbox and one clear task, and only then have the connection, permissions and automatic steps set up. A working Microsoft login does not yet prove that n8n may read a shared mailbox or send email on its behalf.

An example: a heating and plumbing installer in Milan with 25 employees receives service documents at service@. Photos of dripping radiators, technicians' maintenance reports and work orders from property managers land there. Today, Giulia from the office opens each email and saves the attachments in the CRM, the program where the business keeps customers and jobs. In future, n8n should read the emails and file the attachments with the right job. Anything unclear stays with Giulia.

Key takeaways

  • Reading and sending are two different permissions. Before setup, write down what the workflow should do, and have the permissions checked for exactly that.
  • Subject and sender are not enough to recognise an email reliably. Decide how the workflow recognises an email, in a way that fits the Microsoft interface it uses.
  • A reply draft is a good start, because a person sees the email before it goes out.

01 / 14

What can n8n do with Outlook and Microsoft 365?

According to the n8n documentation, the official Outlook node, the building block for Outlook in n8n, has functions for messages, drafts, folders, attachments and the calendar, among others. Which login and function you can use also depends on the node version and your Microsoft settings.

Start with a clearly limited task, for example the service documents in the team's shared mailbox. A brief like "the AI manages all email" needs very different permissions. The workflow would need the right to read, sort, forward and delete email and to reply to outsiders. Someone should justify and sign off each of these actions separately.

In a sensible first version, the workflow reads the relevant emails and prepares a suggestion that a person can check. If that works reliably, explicitly allowed actions can be added. That n8n can technically do something is not yet a reason to run it automatically.

02 / 14

Which mailbox and which login does the workflow use?

Write down the exact mailbox address and who should work with it. At the installer, that is service@, used by Giulia and her colleague. A personal mailbox is different from one that several people share. Also settle who owns the connection and what happens when that person is absent, for example on holiday or sick, or leaves.

Test exactly the mailbox that the workflow will later read. At the installer, the IT provider first tries the connection with his own inbox, and everything works. That can give false confidence when the workflow will later read service@.

03 / 14

Which Microsoft permissions does the workflow need?

This week, write a short list before your IT team sets anything up. What should the workflow do, where does it stop, and how will you see in the test that it sticks to that? At the installer, the list looks like this:

What the workflow does Where the limit is What you check in the test
Read emails Only the specified inbox, here service@ Are other mailboxes left out?
Fetch attachments Only permitted file types and only for the intended jobs Does it skip attachments nobody needs?
Create a draft A person decides whether the email goes out Does the draft really stay unsent?
Move an email Only once processing is confirmed Can Giulia find an email where something went wrong?
Send a reply Only content and recipients that someone has approved Is the right sending identity used?

Whoever manages your Microsoft 365, for example your IT provider, uses it to check permissions for exactly these actions. Record which permissions were granted, on which date and who is responsible for them. If a ready-made n8n node asks for more permissions than you want to give for this task, your IT team finds a suitable option with fewer, or the workflow does less. And if an error appears, nobody should widen the permissions just to make it go away.

04 / 14

A morning in the service mailbox

At 7:42, Mrs Rossi writes: "Job 24-1187, photo of the bathroom radiator attached." n8n reads the email and stores a stable reference for it. Then it checks whether the email contains a usable job number. Only if exactly one valid job matches does n8n file permitted attachments. Here that is the case, so the photo, a permitted file type, goes there. Only once the storage location is confirmed does n8n record it and mark or move the email by the agreed rule, for example into the folder "Done".

At 8:15, a customer writes: "The heating is dripping again, please come by." With no job number, n8n creates a clarification task for Giulia. Shortly afterwards, a property manager names two contradicting job numbers in one email. Rather than n8n simply taking the first one, Giulia decides.

A technician sends a maintenance report as a password-protected PDF. This email stays open, as does one with a file type that is not permitted. Giulia sees the specific reason, such as "file protected by password". n8n could also send a short reply such as "Thank you, we have received your documents.", but this reply is optional, and someone has to allow it separately.

At 9:30, an email arrives: "Our bank details have changed, please only pay into this account from now on." The email creates work, but does not show whether the sender may ask for this or whether the details are correct. Changes to payment or contact details and other consequential records in particular therefore need additional business rules. Fetching the email, matching it to the job and deciding what follows remain three separate steps.

05 / 14

How do you identify Outlook messages reliably?

Two customers write on the same day with the subject "Heating dripping", and conversely n8n can read the same email twice. From subject and sender alone, the workflow cannot tell whether it has already processed an email. So your IT team decides how it recognises an email, to fit the Microsoft interface n8n uses for Outlook.

An email with three maintenance reports is one email with several files. n8n should record the email, the job and the confirmed files separately. If something goes wrong after the second report, for example the connection breaks, the workflow must recognise on restart that two are already in the CRM, even if the third is missing. Restarting from scratch must not create all three again.

06 / 14

What happens to attachments and the email text?

Not every attachment is a business document. The logo in a signature, pictures in the text and forwarded emails can add files. Decide which file types and sizes are permitted and what happens to nested content such as a forwarded email. An ending such as .pdf alone does not prove the expected content either.

When n8n extracts the text, it must separate the new message from quoted earlier emails and the signature. Where an AI sorts the emails, send it only what it needs. Record whether the AI also looks at attachments and what happens if it returns nothing or cannot read the content.

An error message should not copy the whole email with its attachments into a Teams or other channel that many colleagues read. For a first look, the case number and a protected link are often enough. Whoever investigates needs secure access to the details, not another copy nobody controls.

07 / 14

When does a reply go out to the customer?

A reply draft is a good start. n8n collects the job details and writes a suggestion: "Dear Mrs Rossi, our technician will come on Thursday at 8 am." Before anything goes out, Giulia sees the recipient, the subject, the text and any attachments, and then decides whether to send it.

Giulia's OK should apply to exactly the version she has seen. If someone later changes the recipient or text, it must be settled in advance whether Giulia checks again. A general permission such as "the workflow may reply to customers" is too vague for a single customer request.

Also plan for Giulia rejecting a draft or not reacting at all. If she does not reply, she has not agreed. After a deadline, a reminder can follow, or someone else in the office takes the case. But the workflow should not send an unapproved draft just because time is short.

Got a workflow like this?

Tell me about it. Honest take and a rough price, usually within a day.

08 / 14

Which mailbox cases should you test?

Run through these cases before real customer emails arrive:

Test case What should happen
Email with a valid job number The email lands with exactly one job
The same email is read again No second business entry, such as a duplicate file on the job
Three permitted attachments Three distinct file references on the same job
Invalid or ambiguous job number Giulia sees a task to clarify it, and nothing lands with the wrong job
n8n may not read the mailbox A technical warning goes to the person who owns the connection
Giulia rejects a reply draft Nothing is sent
Email was moved to another folder n8n recognises it again under the chosen method

Add a case where the response from the target system gets lost. The file or task may then already be in the target, such as the CRM, although n8n got no success confirmation. The workflow has to check there before creating it again. In the test, check in the mailbox and in the CRM or document system.

Also run an email without an attachment and one with a file name seen before, such as "Photo.jpg". This shows whether the workflow confuses "nothing to file" with an error, or acts as if every file name were unique.

09 / 14

How do you find faults without simply granting more permissions?

If only certain emails are missing, your IT team checks the filters, the time window queried, the folder and whether the workflow fetches all pages of long lists. And if tasks land twice in the CRM, it checks how the workflow recognises emails and whether two runs overlap. A more expensive plan or more permissions do not solve such data-logic faults by themselves.

For each fault, store the details without confidential content, with the date, time and case number. Your administrator can then search specifically, and nobody needs blanket access to the whole mailbox. Note the cause and fix so you can classify the next identical case faster.

10 / 14

Who looks after the Outlook workflow day to day?

Decide who in the office checks whether the emails are processed correctly, who renews the Microsoft login and who changes the workflow.

Besides error messages, watch for cases open unusually long or missing entirely. If no photo has reached the CRM since Tuesday, that is suspicious, even without an error message. The workflow can query an empty folder without a technical error because someone set the wrong folder.

When Giulia is on holiday, her substitute must be able to find an open case and handle it safely. Only then is the setup properly complete. For this, keep a record of how n8n logs in to Microsoft, which mailbox the workflow reads, which field is transferred where, the test cases and recovery instructions. When staff change, check the permissions in n8n and the accounts and consents at Microsoft.

Also name a substitute for the account the connection depends on. If it is disabled or its holder leaves, the restart must not depend on someone who is gone confirming their login.

For the case that the connection fails, also decide what the office does. Does Giulia go back to working directly in the mailbox? And how does the office reconcile the emails she handled by hand once the workflow runs again?

11 / 14

How do you see whether the workflow helps your office?

During the test phase, count three things: how many emails the workflow matched correctly, how many Giulia had to clarify and how much time she still needs for checking. A high count of emails read says nothing about the benefit yet. What counts is whether Giulia searches and copies less without more emails landing with the wrong job.

Look closely at the cases the workflow rejected or left lying. If many of them are open because a job number is missing, better instructions for customers can help more than additional AI. First improve the source of n8n's knowledge and data if Giulia has to rewrite drafts heavily. Only after that do replies without Giulia's check come into question.

After that, extend the workflow only where it has proven itself in the test. That can be another kind of email, another permitted file type or one specific kind of reply. Each extension gets its own test cases. That way, the workflow grows with what you can check, not with ever broader mailbox permissions.

12 / 14

For your IT team

Microsoft distinguishes access on behalf of a signed-in user from access by an application without a user present. This choice affects consent, permissions and operation. Use the n8n guide to Microsoft credentials, that is the login data stored in n8n, together with the current Outlook node documentation. Do not copy a blanket selection of permissions from a screenshot.

For shared or delegated folders, Microsoft names additional requirements in its Graph documentation on shared messages and folders. A successful application login does not yet confirm that the target mailbox and the intended action are permitted.

How do you set up the Outlook connection in controlled steps?

The setup depends on whether n8n runs in the cloud or on your own server and which kind of login your organisation allows. A sensible order:

  1. Identify a test mailbox.
  2. Have the login model approved.
  3. Configure the required application at Microsoft.
  4. Enter the appropriate callback address (redirect URI).
  5. Create the credential in n8n.
  6. Run a test that only reads.

If you use your own app registration, document the tenant, application ID, responsible person and when the credentials expire and how they are renewed. Secret values belong in the credentials intended for them. A wrong callback address, missing consent and an expired application login are different problems that you should investigate separately.

Then test the smallest write action the workflow needs in a controlled environment, such as a draft with an unmistakable test subject. A green connection icon is not proof. The test must show the right mailbox, the right sending identity and the expected object in the target.

According to Microsoft, ordinary Outlook IDs can change when an item such as a message is moved. Immutable IDs and their limits are described in the Microsoft documentation on immutable IDs. Check this for the chosen access method, and do not assume that every node configuration uses this option by itself.

For faults, separate login, resource permission, data format and API limits. If the login is rejected, check tenant, application configuration and renewal first. But if the login works and mailbox access fails, check the specific resource and permission type.

13 / 14

Take the worksheet

Worksheet

Download the editable CSV table

DecisionDefinitionTest
MailboxPersonal or sharedCorrect input boundary
AccessNecessary read/write scopeForbidden access rejected
MessageStable identifier and stateMove or redelivery
ReplyDraft or approved sendNo premature sending
AccountOwner and renewalRevocation or staff departure

Columns to fill in, in the file: Your value / observation, Owner, Next action.

Download the editable CSV table (CSV). Add your own values, names and open points. This worksheet contains no measured client results.

14 / 14

On SharePoint and credentials, read on here:

For a first conversation, a short description of your task, the programs involved and the typical exceptions is enough. Discuss it with modernagents.

ShareEmail

Related reading

n8n automation

Got a workflow like this?

Tell me about it. Honest take and a rough price, usually within a day.

Robert Van Ysendyck · Founder & Managing Director