Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send Files to Microsoft Teams using WebHook

A while ago I wrote a Powershell module to send notifications to Microsoft Teams:

https://github.com/mhouston100/PSMicrosoftTeams

Works like a charm. Right from the outset, one of the most requested features has been to attach files to the notifications.

Does anyone have any idea, information, documentation etc for attaching files through the 'Incoming Webhook' connector?

I've tried embedding Base64 encoded content directly in the notification etc but it doesn't seem to be the right wau

like image 742
mhouston100 Avatar asked Dec 31 '18 01:12

mhouston100


People also ask

How do you use Webhooks in Microsoft Teams?

Open the channel in which you want to add the webhook and select ••• More options from the top navigation bar. Search for Incoming Webhook and select Add. Copy and save the unique webhook URL present in the dialog window. The URL maps to the channel and you can use it to send information to Teams.

How do you send a message to Teams on webhook?

To send a message through your Incoming Webhook or Office 365 Connector, post a JSON payload to the webhook URL. This payload must be in the form of an Office 365 connector card. You can also use this JSON to create cards containing rich inputs, such as text entry, multiselect, or selecting date and time.

How do I get a webhook URL for Microsoft Teams?

Open MS Teams, select “Channel,” and then click on More options (…) and choose Connectors. 2. A pop-up window will come up. Select All from the Category section in the left pane, find Incoming Webhook, and click Add button to add Incoming Webhook.


1 Answers

Connectors only support MessageCard format. Attachments are not supported. You can use Bots to send or receive files to user.

like image 168
Wajeed-MSFT Avatar answered Oct 17 '22 02:10

Wajeed-MSFT