cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bcampbell13
Advocate II
Advocate II

How to get file content to attach to email (not with sharepoint)?

Is there any alternative to the Sharepoint Get-Content options?  I have files in a microsoft teams channel which I need to email, but I can't use sharepoint for security reasons, is there a Graph call or any other way to get the file content?

 

 

 

bcampbell13_0-1604020065445.png

 

3 REPLIES 3
v-bofeng-msft
Community Support
Community Support

Hi @bcampbell13 :

Do you want to get files from microsoft teams channel and send them via email?

I am afraid there is no other way, because In fact, the files in the message are stored in SharePoint Library.

Teams group will generate the SharePoint Site group and store the files in Shared Document. Each Channel has a corresponding folder.

I think this link will help you a lot:

https://powerusers.microsoft.com/t5/General-Power-Automate/How-flow-get-image-from-ms-teams-to-send-...

In addition, you can download the file and save it in OneDrive, and then use OneDrive's related actions to get the file content.

Best Regards,

Bof

Let me clarify, Teams (Sharepoint) is fine to hold the data.  What I'm doing is creating an excel file from data and then attaching it and sending the file.  I use Microsoft Graph calls to create the excel, write all the data, which works great and it's stored in the teams channel.  The only problem is, that one call to get the file content (file) to attach it to the email, can only be done with the Sharepoint Connector: Get File Content.  My users can't have access to sharepoint, so I can not use that connector.

 

Is there a way to get the file content through microsoft graph or can I make the sharepoint call via RestAPI so it does not need the connector?

 

All I need is some way to access the file to get it's content, which is not the sharepoint connector.

Hi @bcampbell13 :

I'm afraid that is not available.If the user does not have access to the SharePoint Site ,then he can not obtain the file in the SharePoint Site.

If the user can not get the files in the channel from SharePoint, I think the only way is to capture the attachments in the message in real time when the message in the channel is created.I think this link will help you a lot:

https://powerusers.microsoft.com/t5/Building-Flows/Get-Attachment-Content-from-Microsoft-Teams-Messa...

This case uses the "When a channel message is created" action to capture the newly created message in the channel, and then get the attachment in the message. on your side, then you can use OnDrive to create and save files.

Best Regards,

Bof

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,872)