Back to n8n Fundamentals
n8n Fundamentals

How to Connect Outlook Calendar to n8n

Same as above for Outlook Calendar.

How to Connect Outlook Calendar to n8n

Connecting Outlook Calendar to n8n requires registering an app in Azure AD, configuring OAuth2 credentials, and setting proper API permissions. This guide walks through the exact configuration steps, including the specific scopes you need and how to handle common authentication errors.

What You Need Before Starting

  • n8n instance (cloud or self-hosted version 0.200.0+)
  • Microsoft 365 account with admin access to Azure AD
  • 15 minutes to complete the setup

If you're on a self-hosted n8n instance, confirm your OAuth callback URL is publicly accessible. Microsoft's OAuth flow requires a valid redirect URI.

Step 1: Register Your Application in Azure AD

  1. Navigate to portal.azure.com and sign in with your Microsoft 365 admin account.

  2. Search for "Azure Active Directory" in the top search bar and select it.

  3. Click App registrations in the left sidebar, then click New registration.

  4. Fill in the registration form:

    • Name: "n8n Calendar Automation" (or your preferred name)
    • Supported account types: Select "Accounts in this organizational directory only" for single-tenant access
    • Redirect URI: Select "Web" and enter your n8n OAuth callback URL
  5. Your n8n OAuth callback URL follows this format:

    • Cloud: https://app.n8n.cloud/rest/oauth2-credential/callback
    • Self-hosted: https://your-n8n-domain.com/rest/oauth2-credential/callback
  6. Click Register.

  7. On the app overview page, copy these values to a text file:

    • Application (client) ID
    • Directory (tenant) ID
  8. Click Certificates & secrets in the left sidebar.

  9. Under "Client secrets", click New client secret.

  10. Add a description like "n8n integration key" and set expiration to 24 months.

  11. Click Add and immediately copy the secret Value (not the Secret ID). You cannot retrieve this value again after leaving the page.

Step 2: Set API
Permissions

  1. In your app registration, click API

    permissions in the left sidebar.

  2. Click Add a permission, then select Microsoft Graph.

  3. Choose Delegated permissions.

  4. Add these specific permissions:

    • Calendars.ReadWrite - Read and write to user calendars
    • Calendars.ReadWrite.Shared - Access shared calendars (if needed)
    • offline_access - Maintain access without user presence
    • User.Read - Sign in and read user profile
  5. Click Add permissions.

  6. Click Grant admin consent for [Your Organization] and confirm. This step requires admin privileges.

The status column should now show green checkmarks for all permissions.

Step 3: Configure OAuth2 Credentials in n8n

  1. Open your n8n instance and navigate to Credentials from the left menu.

  2. Click Add Credential and search for "Microsoft Outlook OAuth2 API

    ".

  3. Fill in the credential form:

    • Credential Name: "Outlook Calendar - Production"
    • Grant Type: Authorization Code
    • Authorization URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
    • Access Token URL: https://login.microsoftonline.com/common/oauth2/v2.0/token
    • Client ID: Paste your Application (client) ID from Step 1
    • Client Secret: Paste your client secret from Step 1
    • Scope: https://graph.microsoft.com/Calendars.ReadWrite https://graph.microsoft.com/offline_access
    • Auth URI Query Parameters: Leave blank
    • Authentication: Body
  4. Click Connect my account.

  5. A Microsoft login window opens. Sign in with the account that owns the calendar you want to access.

  6. Review the permissions request and click Accept.

  7. You'll be redirected back to n8n. The credential status should show "Connected".

  8. Click Save to store the credential.

Step 4: Add the Microsoft Outlook Node to a Workflow

  1. Create a new workflow or open an existing one.

  2. Click the + button to add a node and search for "Microsoft Outlook".

  3. Select the Microsoft Outlook node (not the deprecated Outlook node).

  4. In the node settings:

    • Credential to connect with: Select your "Outlook Calendar - Production" credential
    • Resource: Calendar
    • Operation: Get All (to test the connection)
  5. Click Execute Node to test.

  6. If configured correctly, you'll see a list of your calendar events in the output panel.

Step 5: Verify Calendar Access

Test three operations to confirm full access:

Test 1: Retrieve Events

  • Operation: Get All
  • Calendar: Leave blank (uses primary calendar)
  • Return All: Toggle ON
  • Execute and verify you see your events

Test 2: Create Event

  • Operation: Create
  • Calendar: Leave blank
  • Subject: "n8n Integration Test"
  • Start: Set to tomorrow at 10:00 AM
  • End: Set to tomorrow at 11:00 AM
  • Execute and check your Outlook calendar for the new event

Test 3: Update Event

  • Operation: Update
  • Event ID: Use the ID from the event you just created
  • Subject: "n8n Integration Test - Updated"
  • Execute and verify the event title changed

If all three tests succeed, your integration is fully operational.

Common Authentication Errors and Fixes

Error: "AADSTS50011: The reply URL specified in the request does not match"

  • Fix: Verify your redirect URI in Azure AD exactly matches your n8n OAuth callback URL. Check for trailing slashes.

Error: "AADSTS65001: The user or administrator has not consented"

  • Fix: Return to Azure AD > API
    permissions and click "Grant admin consent" again.

Error: "invalid_grant: AADSTS54005: OAuth2 Authorization code was already redeemed"

  • Fix: Delete the credential in n8n and recreate it. This happens when the OAuth flow is interrupted.

Error: "Insufficient privileges to complete the operation"

  • Fix: Confirm you added Calendars.ReadWrite permission in Azure AD and granted admin consent.

Production Workflow Examples

Auto-Schedule Client Meetings from Form Submissions

  1. Trigger: Webhook (receives form data)
  2. Microsoft Outlook node:
    • Operation: Create
    • Subject: {{$json.client_name}} - Initial Consultation
    • Start: {{$json.preferred_date}}T{{$json.preferred_time}}:00
    • End: Use an expression to add 1 hour to start time
    • Attendees: {{$json.client_email}}
    • Body: Include meeting agenda and video call link

Sync Calendar Events to Slack Daily

  1. Schedule Trigger: Every day at 8:00 AM
  2. Microsoft Outlook node:
    • Operation: Get All
    • Start Time: {{$now.startOf('day').toISO()}}
    • End Time: {{$now.endOf('day').toISO()}}
  3. Function node: Format events into readable message
  4. Slack node: Post to #team-calendar channel

Block Calendar Time When Project Tasks Are Due

  1. Trigger: Webhook
    from project management tool
  2. IF node: Check if task has a due date
  3. Microsoft Outlook node:
    • Operation: Create
    • Subject: Focus Time: {{$json.task_name}}
    • Start: Due date minus 2 hours
    • End: Due date
    • Show As: Busy
    • Is Reminder On: true
    • Reminder Minutes Before Start: 30

Cancel Meetings When Deals Close Lost

  1. Trigger: CRM
    webhook
    (deal status changed to "Lost")
  2. Microsoft Outlook node (Get All):
    • Filter: Subject contains deal name
  3. Loop Over Items node
  4. Microsoft Outlook node (Delete):
    • Event ID: {{$json.id}}
  5. Slack node: Notify team of cancellation

Handling Shared Calendars and Room Resources

To access shared calendars or room resources, modify your API

permissions:

  1. Return to Azure AD > API
    permissions
  2. Add Calendars.Read.Shared and Calendars.ReadWrite.Shared
  3. Grant admin consent

In the Microsoft Outlook node, specify the calendar:

  • Calendar: Enter the email address of the shared calendar or room resource (e.g., conference-room-a@yourcompany.com)

For room resources, you may need Place.Read.All permission to query available rooms programmatically.

Security Best Practices

Rotate Client Secrets Annually Set a calendar reminder to generate a new client secret before the current one expires. Update the n8n credential with the new secret.

Use Separate Credentials for Production and Testing Create two app registrations in Azure AD - one for production workflows and one for development. This prevents test workflows from affecting live calendar data.

Limit Scope to Minimum Required Permissions If you only need read access, use Calendars.Read instead of Calendars.ReadWrite. Review permissions quarterly.

Monitor OAuth Token Usage Check Azure AD sign-in logs monthly to verify only authorized n8n instances are accessing your calendar API

.

Your Outlook Calendar integration is now production-ready. Start with simple workflows like event creation, then expand to complex multi-step automations as you gain confidence with the Microsoft Graph API

operations.

Revenue Institute

Reviewed by Revenue Institute

This guide is actively maintained and reviewed by the implementation experts at Revenue Institute. As the creators of The AI Workforce Playbook, we test and deploy these exact frameworks for professional services firms scaling without new headcount.

Revenue Institute

Need help turning this guide into reality? Revenue Institute builds and implements the AI workforce for professional services firms.

RevenueInstitute.com