Forum Discussion
Uploading the CSV files to teams channel using python
- Jul 26, 2023
chetan_sk - yes, the second option i.e., using bot API, that limits to only personal scope. And as your intent to send files in team's channel you have to go with first approach only.
The file you intent to send must be already present in SharePoint. Once you fire the API query, it will send message with attachment directly in team's channel. (not as reference link to download the file)Thanks,
Prasad Das
------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link.
Prasad_Das-MSFT Thank-you for your response,
To summerise :
The second method which you mentioned Using Teams Bot API: works only when we have to send the message to particular user / person in the miscrosoft team and not to the particular channel or group.
That means for our user case, which is posting it to the teams channel or group we need to go ahead with the first approachUsing Graph API: where we send the message in the channel with the reference link to dowload the file from sharepoint and cant share the actual file.
So there is no direct way of posting the file to microsoft teams, it should always be uploaded to sharepoint, Correct if my understanding is wrong.
Also is there any reference for uploading the file to sharepoint via python ?
Regards,
Chetan
chetan_sk - yes, the second option i.e., using bot API, that limits to only personal scope. And as your intent to send files in team's channel you have to go with first approach only.
The file you intent to send must be already present in SharePoint. Once you fire the API query, it will send message with attachment directly in team's channel. (not as reference link to download the file)
Thanks,
Prasad Das
------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link.