If you followed an older tutorial to post a website form to Teams, it probably used an Incoming Webhook connector with a webhook.office.com URL. Those are gone. Microsoft retired Office 365 connectors in Teams, incoming webhooks included, and the rollout finished on May 22, 2026. Connector URLs don't post anything anymore.
There are three ways to do it now, depending on how much of the form you want to control:
- Microsoft Forms and Power Automate, if your company is on Microsoft 365 and the form doesn't have to look like your site. No code.
- Your own HTML form, a small function and a Workflows webhook, if the form lives on your site.
- A form backend, if you also want spam filtering, storage and retries without running anything.
1. Microsoft Forms and Power Automate
Build the form in Microsoft Forms, set it so anyone can respond, and put it on your site with Collect responses → Embed. Then in Power Automate, create an automated flow:
- Trigger: When a new response is submitted (Microsoft Forms), pick your form.
- Action: Get response details, same form, with the response ID from the trigger.
- Action: Post message in a chat or channel (Microsoft Teams). Post as the Flow bot to your channel and put the answers in the message.
Every response shows up in the channel, and the answers stay in Forms too.
The tradeoff is the form itself. It's a Microsoft form in an iframe, with Microsoft's styling and a Microsoft footer, and you can't add a honeypot or your own validation. For an internal request form that's fine. For the contact form on your marketing site, most people want their own HTML.
2. Your own form, a function and a Workflows webhook
Create the webhook
- In Teams, open the channel, click ⋯ (More options) next to its name and choose Workflows.
- Pick the template Send webhook alerts to a channel.
- Name it, check the team and channel, and click Save.
- Copy the webhook URL. It's long, so copy all of it.
Anyone with that URL can post to your channel. It can't go in your page's JavaScript, so the form posts to a small function on your host that holds the URL and calls Teams.
The form
<form action="/api/teams" method="POST">
<input name="name" placeholder="Name" required>
<input name="email" type="email" placeholder="Email" required>
<textarea name="message" placeholder="Message" required></textarea>
<!-- Honeypot: hidden from people, bots fill it in -->
<div aria-hidden="true" style="position:absolute; left:-9999px">
<input type="text" name="_gotcha" tabindex="-1" autocomplete="off">
</div>
<button type="submit">Send</button>
</form>
The function
On Vercel, save this as api/teams.js and set TEAMS_WEBHOOK_URL and THANKS_URL (the full URL of your thank-you page) in the project's environment variables:
// Teams card text is markdown. Breaking "](" stops a visitor from
// disguising a link, like [https://yourbank.com](https://evil.example).
const clean = (value, max) => String(value ?? "").slice(0, max).replace(/\]\(/g, "](");
export async function POST(request) {
const form = await request.formData();
if (form.get("_gotcha")) return Response.redirect(process.env.THANKS_URL, 303);
const name = clean(form.get("name"), 200);
const email = clean(form.get("email"), 200);
const message = clean(form.get("message"), 5000);
if (!email || !message) return new Response("Email and message are required", { status: 400 });
// The "Send webhook alerts to a channel" template posts the cards in
// `attachments`, so send a card even for a simple message.
const res = await fetch(process.env.TEAMS_WEBHOOK_URL, {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
type: "message",
attachments: [
{
contentType: "application/vnd.microsoft.card.adaptive",
contentUrl: null,
content: {
$schema: "http://adaptivecards.io/schemas/adaptive-card.json",
type: "AdaptiveCard",
version: "1.2",
msteams: { width: "Full" },
body: [
{ type: "TextBlock", text: "New contact form message", weight: "Bolder", size: "Medium" },
{
type: "FactSet",
facts: [
{ title: "Name", value: name },
{ title: "Email", value: email },
],
},
{ type: "TextBlock", text: message, wrap: true },
],
},
},
],
}),
});
if (!res.ok) return new Response("Couldn't send your message. Please try again.", { status: 502 });
return Response.redirect(process.env.THANKS_URL, 303);
}
On Netlify it's the same code in netlify/functions/teams.mjs, with export default async (request) => { … } instead of export async function POST(request), plus export const config = { path: "/api/teams" }; so the form's action still works. It's plain fetch, so any host that runs JavaScript functions will take it with small changes.
What trips people up with Workflows
- A success response doesn't mean the card was posted. Teams accepts the request and the workflow runs after that, so it can fail inside Teams while your function sees a 2xx. When nothing shows up, open Workflows in Teams, pick the workflow and check its run history. That's also where you'll find it was turned off.
- The workflow belongs to a person, not the channel. If the account that created it is removed, say when someone leaves the company, the posts stop. Add a co-owner or create it from an account that will stay. This applies to the Power Automate flow in option 1 too.
- 28 KB per message. Teams rejects anything bigger, which is why the code caps every value.
- Power Automate throttling. Workflows webhook triggers are throttled based on your Power Automate performance profile, and this function doesn't retry, so a burst can lose messages.
-
Markdown in visitor text. Card text renders markdown, so a visitor can write a link that shows one address and opens another. The
clean()helper breaks that pattern. Mentions are safe: in cards they need explicit entities, so a typed@namedoesn't ping anyone.
Posts also show as coming from the Workflows bot. You can't set your own name or icon.
The function also doesn't stop spam beyond the honeypot. Bots that post straight to /api/teams and hand-written SEO pitches still reach the channel (how to stop contact form spam covers the layers). And if the workflow fails, that submission is gone, because nothing stored it.
3. A form backend
With Formkove, the form posts to a Formkove URL and you don't deploy a function:
<form action="https://app.formkove.com/api/forms/YOUR_FORM_ID/submissions" method="POST">
Create the Workflows webhook as in option 2, then in the form's Integrations → Microsoft Teams, paste its URL and click Send test. If you paste an old webhook.office.com URL, Formkove tells you to create a workflow instead. Each submission arrives as a card with the form name, the fields, a download link for each uploaded file and, when AI is on, its sentiment and tags. Big submissions are trimmed to fit the 28 KB limit, with a note to see the rest in the dashboard.
To send only some submissions to a channel, add a routing rule to the connection. For example, a sales channel that only gets submissions tagged sales-lead, or a support channel for submissions where the topic field is support. Rules can test the tags and sentiment Formkove adds, the spam score, or any form field, and you can add one Teams connection per channel.
Spam is held back before it reaches Teams and kept in your dashboard for 30 days in case one was a real message. Every submission is saved and emailed to you even when the workflow is off, and failed deliveries are retried and listed in Delivery history.
Teams, tags and routing are on the Pro and Agency plans, and Free accounts get them on their first 50 submissions (pricing). Setup details and troubleshooting are in the Microsoft Teams docs.
Originally published on formkove.com.
Top comments (0)