DEV Community

Pirate Prentice
Pirate Prentice

Posted on

n8n Microsoft Teams Node: Send Messages, Create Channels, and Automate Team Notifications (Free Workflow JSON)

n8n Microsoft Teams Node: Send Messages, Create Channels, and Automate Team Notifications (Free Workflow JSON)

Microsoft Teams is the backbone of enterprise communication for millions of organizations. If your team runs on Teams, you need your n8n automations talking to it — sending alerts when Stripe payments fail, routing Jira tickets to the right channel, or posting daily digest reports without anyone lifting a finger.

This guide covers everything you need to know about the n8n Microsoft Teams node: all available operations, authentication setup, common gotchas, and three production-ready workflow patterns with free JSON you can import today.


What the n8n Microsoft Teams Node Can Do

The Microsoft Teams node in n8n lets you interact with Teams via the Microsoft Graph API. Supported operations include:

Channel

  • Create — create a new channel in a team
  • Delete — delete an existing channel
  • Get — retrieve a channel's details
  • Get Many — list all channels in a team

Channel Message

  • Create — post a message to a channel
  • Get Many — retrieve messages from a channel

Chat Message

  • Create — send a message to a 1:1 or group chat
  • Get — retrieve a specific chat message
  • Get Many — list messages in a chat

Task (via Planner)

  • Create — create a task in a Planner plan
  • Delete — delete a Planner task
  • Get — retrieve a Planner task
  • Get Many — list Planner tasks
  • Update — update task fields (title, bucket, due date, completion)

Authentication: OAuth2 via Microsoft App Registration

The Teams node authenticates via OAuth2 using a Microsoft Azure App Registration. You'll need to set this up once in Azure AD:

Step-by-step setup

  1. Go to portal.azure.comAzure Active DirectoryApp registrationsNew registration
  2. Name your app (e.g., "n8n Integration"), set Redirect URI to your n8n OAuth callback URL (shown in the credential setup screen)
  3. Under API permissions, add these Microsoft Graph Delegated permissions:
    • ChannelMessage.Send
    • Channel.ReadBasic.All
    • Chat.ReadWrite
    • Team.ReadBasic.All
    • Tasks.ReadWrite (if using Planner)
  4. Click Grant admin consent (requires admin privileges)
  5. Under Certificates & secrets, create a new Client secret — copy it immediately
  6. Copy your Application (client) ID and Directory (tenant) ID

In n8n, create a Microsoft Teams OAuth2 API credential with:

  • Client ID — from Azure
  • Client Secret — from Azure
  • Tenant ID — from Azure (or "common" for multi-tenant)

All Operations Reference

Channel Operations

Create Channel

{
  "resource": "channel",
  "operation": "create",
  "teamId": "={{ $json.teamId }}",
  "displayName": "project-alpha",
  "description": "Channel for Project Alpha coordination",
  "type": "standard"
}
Enter fullscreen mode Exit fullscreen mode

Channel type: standard (visible to all team members) or private (invite-only).

Get Many Channels

{
  "resource": "channel",
  "operation": "getAll",
  "teamId": "={{ $json.teamId }}",
  "returnAll": true
}
Enter fullscreen mode Exit fullscreen mode

Channel Message Operations

Create Channel Message

{
  "resource": "channelMessage",
  "operation": "create",
  "teamId": "={{ $json.teamId }}",
  "channelId": "={{ $json.channelId }}",
  "message": "🚨 Payment failed for customer {{ $json.customer_email }} — ${{ $json.amount }}. Check Stripe dashboard."
}
Enter fullscreen mode Exit fullscreen mode

You can send HTML-formatted messages by setting the content type to HTML:

{
  "message": "<h3>🔴 Payment Alert</h3><p>Customer <strong>{{ $json.customer_email }}</strong> failed a ${{ $json.amount }} charge.</p><p><a href=\"{{ $json.stripe_link }}\">View in Stripe →</a></p>",
  "contentType": "html"
}
Enter fullscreen mode Exit fullscreen mode

Get Many Channel Messages (for polling/digest workflows):

{
  "resource": "channelMessage",
  "operation": "getAll",
  "teamId": "={{ $json.teamId }}",
  "channelId": "={{ $json.channelId }}",
  "returnAll": false,
  "limit": 50
}
Enter fullscreen mode Exit fullscreen mode

Chat Message Operations

For 1:1 or group chats (not channels):

{
  "resource": "chatMessage",
  "operation": "create",
  "chatId": "={{ $json.chatId }}",
  "message": "Your report is ready. Download it here: {{ $json.report_url }}"
}
Enter fullscreen mode Exit fullscreen mode

To find a chat ID, use Get Many on the Chat resource to list your available chats.


Planner Task Operations

Create Task

{
  "resource": "task",
  "operation": "create",
  "planId": "={{ $json.planId }}",
  "bucketId": "={{ $json.bucketId }}",
  "title": "Follow up with {{ $json.company_name }}",
  "additionalFields": {
    "dueDateTime": "={{ $json.due_date }}",
    "percentComplete": 0
  }
}
Enter fullscreen mode Exit fullscreen mode

Update Task (mark complete)

{
  "resource": "task",
  "operation": "update",
  "taskId": "={{ $json.taskId }}",
  "updateFields": {
    "percentComplete": 100
  }
}
Enter fullscreen mode Exit fullscreen mode

6 Common Gotchas

1. Team ID vs Channel ID confusion

The node requires both a Team ID and a Channel ID for channel operations — not just channel names. Use Get Many on Channel to pull the list dynamically. Team IDs are GUIDs; they don't appear in URLs by default — you may need to use the Teams admin portal or Graph API Explorer to find them initially.

2. Admin consent is required

Even if your personal account has all permissions, the Azure app won't work until an admin grants tenant-wide consent. This is a Microsoft security requirement. If you get 403 Forbidden errors, this is almost always the cause.

3. Rate limits: 60 messages per minute per app

Microsoft Graph enforces a 60-message-per-minute limit per app registration for Teams channel messages. For bulk notification workflows, add a Wait node (1 second) between channel messages or use the Split in Batches node to throttle throughput.

4. HTML messages require explicit content type

By default, Teams sends messages as plain text. To use HTML formatting (bold, links, headers), you must set the content type to html explicitly. Markdown is not supported — Teams uses a custom Adaptive Card format for rich content.

5. Planner requires knowing plan and bucket IDs

Planner tasks need a planId and bucketId — neither of which is visible in the Teams UI. To get them, use Get Many on the Task resource with a broad filter, or query the Graph API Explorer at https://developer.microsoft.com/en-us/graph/graph-explorer.

6. Bot vs user authentication context

n8n's Teams node authenticates as a delegated user (the OAuth2 account). It cannot create bots or post as an app — messages appear as coming from the authenticated user. If you need messages to appear as a bot name, you'll need to set up an Incoming Webhook connector in Teams separately and call it via the HTTP Request node.


3 Production-Ready Workflow Patterns

Pattern 1: Stripe Failed Payment → Teams Alert

Use case: Instantly notify your ops team channel when a Stripe payment fails, so no revenue recovery is delayed.

Workflow:

  1. Webhook Trigger — receive Stripe payment_intent.payment_failed event
  2. Set node — extract customer_email, amount, failure_reason, payment_intent_id
  3. Microsoft Teams node — Create Channel Message (HTML):
<h3>🔴 Payment Failed</h3>
<p>Customer: <strong>{{ $json.customer_email }}</strong></p>
<p>Amount: <strong>${{ $json.amount }}</strong></p>
<p>Reason: {{ $json.failure_reason }}</p>
<p><a href="https://dashboard.stripe.com/payment_intents/{{ $json.payment_intent_id }}">View in Stripe →</a></p>
Enter fullscreen mode Exit fullscreen mode
  1. Gmail node — optionally send recovery email to customer in parallel

Free JSON: See footer.


Pattern 2: Daily Jira Sprint Digest → Teams Channel

Use case: Post a morning standup digest of open sprint tickets to your dev team channel, eliminating the need for everyone to check Jira individually.

Workflow:

  1. Schedule Trigger — every weekday at 9:00 AM
  2. Jira node (Get Many) — filter by sprint = openSprints() AND status != Done
  3. Code node — format issue list as HTML table:
const issues = $input.all();
const rows = issues.map(i => 
  `<tr><td><a href="https://yourjira.atlassian.net/browse/${i.json.key}">${i.json.key}</a></td><td>${i.json.fields.summary}</td><td>${i.json.fields.assignee?.displayName || 'Unassigned'}</td><td>${i.json.fields.status.name}</td></tr>`
).join('');
return [{ json: { html: `<table><tr><th>Ticket</th><th>Summary</th><th>Assignee</th><th>Status</th></tr>${rows}</table>` }}];
Enter fullscreen mode Exit fullscreen mode
  1. Microsoft Teams node — Create Channel Message with HTML body

Pattern 3: New HubSpot Deal → Teams Notification + Planner Task

Use case: When a new deal reaches "Proposal Sent" stage in HubSpot, notify the account team in Teams and create a follow-up Planner task automatically.

Workflow:

  1. HubSpot Trigger — on deal stage change to "Proposal Sent"
  2. Microsoft Teams node (Channel Message) — post to #sales channel:
🎯 New proposal sent to {{ $json.company_name }} — ${{ $json.deal_value }}
Deal owner: {{ $json.owner_name }}
Close date: {{ $json.close_date }}
Enter fullscreen mode Exit fullscreen mode
  1. Microsoft Teams node (Task Create) — create Planner task:
    • Title: "Follow up: {{ $json.company_name }} proposal"
    • Due date: 3 days from now ({{ $now.plus(3, 'days').toISO() }})
    • Bucket: "Follow-ups"

Result: Zero manual coordination; the system creates the accountability trail.


Free Workflow JSON

Download a ready-to-import n8n workflow covering all three patterns above:

n8n Microsoft Teams → Slack Channel Alert — $9 — ready-to-import 3-node workflow: Webhook Trigger → Code (format Teams payload) → Slack (post message). Deploy in under 5 minutes.

n8n Workflow Starter Pack ($29) — includes Teams notification workflows + 10 more

Prefer someone to build it for you? Done-for-You n8n Workflow Build — $99. You describe your automation, I build and deliver a working workflow JSON within 48 hours.


Microsoft Teams Node vs Slack Node

Capability Teams Node Slack Node
Channel messages
Direct/chat messages
Task management ✅ (Planner)
Incoming webhooks Via HTTP Request ✅ native
Authentication OAuth2 (Azure) OAuth2
Admin consent required ✅ Yes ❌ No
Rate limits 60 msg/min 1 msg/sec (Tier 1)

If your organization is on Microsoft 365, the Teams node gives you deeper integration with Planner, channels, and the broader Microsoft Graph ecosystem. Slack is simpler to set up but lacks Planner task management.


What's Next

You've now got full control over Microsoft Teams from your n8n workflows — channel alerts, chat messages, and Planner tasks. Combine this with the Stripe Webhooks guide, Jira node guide, and HubSpot node guide for a fully connected enterprise workflow stack.

Get the n8n Workflow Starter Pack — $29
Done-for-You Workflow Build — $99

Related Articles

Top comments (1)

Collapse
 
pirateprentice profile image
Pirate Prentice

Are you using the Microsoft Teams node to send channel alerts, post daily digests, or create Planner tasks from your workflows? I am especially curious about the OAuth2 setup — Azure App Registration can be a pain on the first pass. Drop your use case in the comments and I will help troubleshoot if anything is blocking you.