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
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.
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.
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.
Connectors only support MessageCard format. Attachments are not supported. You can use Bots to send or receive files to user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With