0
votes

Can we send file as an attachment along with message in teams using webhooks or api? Currently we can send only text message using webhooks and not attach files.

I want to mimic the action in the screenshot below:- Attach file present in the system

There are ways to first upload file to one drive and then send its link in the teams message but I do not want to use that solution.

Is there a way to directly upload file from your system as an attachment to the microsoft teams using webhook or any alternative way.

Thanks!!

1
Teams can send message and attach files at the same time. you want to code and reproduce this function?Molly Wang-MSFT
@MollyWang-MSFT if you provide code samples then it will helpful for future reference.Rajeesh Menoth
@RajeeshMenoth. Sorry, I'm not familiar with teams-toolkit but this feature already exists in my teams App.Molly Wang-MSFT
@MollyWang-MSFT no issues, I think as per the question always the ms team upload will move to onedrive. So instead of that Is there any other way to upload documents to any third party API and I am also looking the same approach for a long time.Rajeesh Menoth

1 Answers

1
votes

Currently it is not supported to send attachments using webhook. You will need to use bot to send and receive attachments. You can refer this link. https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/bots-filesv4