Appearance
Microsoft Teams Notifications
Scripts send Teams messages via the injected $notifications object, using named webhooks you configure in Admin Settings. Teams notifications support an optional title parameter that appears as a bold heading in the message card.
1. Create a Teams Incoming Webhook
New Workflows approach (2024+)
Microsoft is migrating away from Office 365 Connectors. If you don't see a Connectors option in your channel:
- In the channel, click ⋯ → Workflows
- Search for "Post to a channel when a webhook request is received"
- Follow the setup wizard and copy the webhook URL at the end
Classic Connectors (if still available)
- Navigate to the channel in Teams
- Click ⋯ → Connectors
- Search for Incoming Webhook and click Configure
- Give it a name (e.g. "ApiMeld") and click Create
- Copy the webhook URL — it looks like:
https://yourorg.webhook.office.com/webhookb2/...
Both URL formats work with ApiMeld.
2. Add the webhook to ApiMeld
- Go to Admin → Settings → Notifications
- Under Teams Webhooks, click Add
- Enter a name (e.g.
"IT Ops Team") and paste the webhook URL - Click Save
The name you enter here is what you pass as webhookName in your scripts.
Sending from a script
| Language | One-liner |
|---|---|
| PowerShell | $notifications.SendTeams('IT Ops Team', 'Task complete') |
| PowerShell (with title) | $notifications.SendTeams('IT Ops Team', 'Body text', 'Optional Title') |
| JavaScript / TypeScript | notifications.sendTeams('IT Ops Team', 'Task complete') |
| Python | notifications.send_teams('IT Ops Team', 'Task complete') |
| Bash | notify_teams "IT Ops Team" "Task complete" |
| C# | Notifications.SendTeams("IT Ops Team", "Task complete"); |
Larger example (JavaScript)
javascript
const res = await datasources.OrdersApi.GetOrders()
const count = res.data.length
if (count === 0) {
notifications.sendTeams('IT Ops Team', 'No orders found — check the source system.', 'Sync Warning')
} else {
notifications.sendTeams('IT Ops Team', `Synced ${count} orders successfully.`, 'Nightly Sync')
}Parameters
| Parameter | Description |
|---|---|
webhookName | The name of the webhook as saved in Admin → Settings → Notifications |
message | Message body text |
title (optional) | Bold heading displayed above the message |
Testing the webhook
After saving, click Test next to the webhook in Admin → Settings → Notifications to send a test card to the Teams channel.
Multiple channels
Add multiple webhooks pointing to different channels — for example, post failures to #infrastructure-alerts and successes to #apimeld-log.