Automation library · AI assistants

Basic automatic Outlook email folder management

Started by an event in a connected app, and works across Outlook. It hands the judgement calls to Azure OpenAI. 15 steps, 2 branches, 2 loops or waits: a working afternoon to understand properly.

MediumCalls a model: Azure OpenAI

15 stepsMedium: a working afternoon
2Branches: places the flow splits
2Loops or waits
1Service it connects to

The flow

Starts it 1Model 4Logic 5Service 5

The steps in the order they run, from what starts it.

  1. 1Azure OpenAI Chat ModelLm Chat Azure Open AiModel
  2. 2Microsoft Outlook TriggerMicrosoft Outlook triggerStarts it
  3. 3Get many folders in Microsoft OutlookMicrosoft Outlook ToolService
  4. 4Azure OpenAI Chat Model1Lm Chat Azure Open AiModel
  5. 5Outlook Folder Move Rules agentAgentModel
  6. 6Wait 1secWaitLogic
  7. 7Structured Output ParserOutput Parser StructuredModel
  8. 8Get all foldersMicrosoft OutlookService
  9. 9Map agent specified folder name to folderIdCodeLogic
  10. 10Is folderId not empty?IfLogic
  11. 11Move a message to specified folder idMicrosoft OutlookService
  12. 12Create folderMicrosoft OutlookService
  13. 13Is message important?IfLogic
  14. 14Wait 5secWaitLogic
  15. 15Set message to importance to highMicrosoft OutlookService

How it's built

Starts on
An event in a connected app
Steps
15, with 2 branches, 2 loops or waits
Size
Medium: a working afternoon
Connects to
Outlook
Model
Azure OpenAI

Questions

What does it need to run?

An n8n account, plus your own Outlook account, and a key for Azure OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls Azure OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 15 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 15 steps before you point it at anything that matters.