Documentation

✉️ Email Delivery

Documentation, reference material and tutorials for CRM-NG SMTP Email: setup guides for every mail service, troubleshooting, and one article per error message.

Microsoft Teams alerts

Updated

By Duane GarnerChief Executive Officer (CEO)
Summarize: Claude ChatGPT View Markdown
On this page

Send a message to a Microsoft Teams channel whenever your site fails to send an email, using a Teams webhook or a Workflows flow.

This article explains how to post CRM-NG SMTP failure alerts into a Microsoft Teams channel. It is for organisations that run on Microsoft 365 and want website problems to land in Teams.

Teams alerts are sent directly from your web server to Microsoft over HTTPS. They keep working even if your mail service is down.

How CRM-NG SMTP talks to Teams

For each failed email, CRM-NG SMTP sends a small JSON message to the address you give it. The message has a single field called text:

{ "text": "[Your Site Name] WordPress email failed\nSubject: ...\nFrom: ...\nError: ..." }

Microsoft offers two ways to receive messages like this. Which one you use depends on what your Teams tenant allows.

Option What it is Notes
Incoming Webhook connector The classic way: a channel connector that gives you a webhook URL Accepts the text message as it is. Microsoft has been retiring these connectors, so new ones may not be available in your tenant.
Workflows (Power Automate) A flow that starts when a webhook request arrives and posts to a channel Microsoft's current recommendation. You build the flow so that it posts the text field.

Option A: Incoming Webhook connector

If your tenant still offers it:

  1. Open the channel's connectors

    In Teams, open the channel's … menu and look for Manage channel, then Connectors (the exact path varies by Teams version).

  2. Add Incoming Webhook

    Find Incoming Webhook, choose Add or Configure, and give it a name.

  3. Copy the URL

    Teams shows a long webhook address. Copy it.

Option B: A Workflows flow

  1. Start a new workflow

    In Teams, open Workflows (from the … menu on the channel or the apps bar). Choose a template whose current name is similar to "Post to a channel when a webhook request is received". If no template fits, create a flow from scratch with a trigger that receives an HTTP or Teams webhook request.

  2. Choose the team and channel

    Pick where the alerts should appear.

  3. Make the flow post the text

    Edit the posting step so the message body uses the text field from the incoming request. Templates built for Adaptive Cards expect a different format and will not show CRM-NG SMTP's message unless you change this step.

  4. Copy the URL

    When you save the flow, Workflows shows the address that triggers it. Copy it.

Who can set this up

Creating flows may need a Power Automate licence or an admin's approval in some organisations. If you are stuck, ask your Microsoft 365 administrator.

Add the URL in CRM-NG SMTP

  1. Open the Alerts tab

    Go to CRM-NG SMTP → Settings → Alerts.

  2. Find the chat section

    Scroll to Chat and Incident Webhooks.

  3. Paste the URL

    Paste it into Microsoft Teams webhook URL.

  4. Save

    Press Save Alert Settings.

After saving, the box shows Saved — leave blank to keep. The address is stored encrypted. Paste a new one to replace it.

Keep the URL secret

Anyone with the URL can post into your channel or start your flow. Store it like a password.

Test it

On a staging site or at a quiet time, put a wrong key or password in your mailer settings on the General tab, send a test from Tools → Email Test, and check the channel. Then restore the correct settings and send another test.

Troubleshooting

  • Nothing appears with a Workflows flow. Open the flow's run history in Power Automate. If runs show up but the post is empty or failed, the posting step is not reading the text field.
  • Nothing appears at all. Check the full URL was pasted and saved, and that your host allows outbound HTTPS to Microsoft's servers.
  • No alert for some failures. Emails rescued by the backup transport or blocked by Do Not Send do not raise alerts. See Email failure alerts.
Go to Top