Forum Discussion
Richard_Maltese
Jul 15, 2020Copper Contributor
Emails with attachments getting numbers add to the attachment
My company has reports that get sent out daily. We would like to move those reports from getting sent to various users that need to report and want them to get sent to a teams channel. I set up a cha...
- Jul 27, 2020Instead of utilizing the email function to Teams, I would setup a Power Automate Flow that has a trigger that monitors an inbox, and a step that posts / uploads the file in it's place. Then you can name the file on the step you use to upload the file from the inbox trigger to the Team and utilize a date expression in the save to sharepoint (team) step..
Jul 27, 2020
Instead of utilizing the email function to Teams, I would setup a Power Automate Flow that has a trigger that monitors an inbox, and a step that posts / uploads the file in it's place. Then you can name the file on the step you use to upload the file from the inbox trigger to the Team and utilize a date expression in the save to sharepoint (team) step..
Richard_Maltese
Jul 27, 2020Copper Contributor
ChrisWebbTech Thank you for the reply. That is an option however we are trying to remove mailboxes and email distributions as much as possible. Its something we might test though. Thank you again!
- Jul 27, 2020
Richard_Maltese here is the cap of the SharePoint http call action you can use to rename files.
- Jul 27, 2020You could have a flow trigger monitor the folder for the channel and rename the file, but it's a bit more difficult as the only way to rename a file in flow with SharePoint is through an http call, which I can find my action and how I do it if you want. So you could have it monitor for files starting with Report Subscriptions_ and rename them to Report Subscriptions_date(etc.)
The only issue I see with this method might be how that file will look in the chat pane in Teams as it might not update, but if all you are concerned with is the file name in the Files tab, this might be a solution to use instead of dealing with inbox flow.- Richard_MalteseJul 27, 2020Copper ContributorYeah that is more or so what we are worried about as it posts with the date as a new thread for each email/attachment that comes into the channel. If you can share that with me that would be great.
Again thanks for the help on this!- Jul 28, 2020
Youtube search for flow stuff, Laura Rogers Flow should net a ton of content, she does a good job of explaining. Here is a quick mock example of how I would do it, it's just a few steps, when a file in a folder is created, you add your SharePoint URL and folder the channel stores it's files and it will trigger. Then a condition to check if the file name starts with Reporting Schedules_, and if so, then you do an http sharepoint request to rename the file, I tried putting where you would put your document library names in, and at the end, I messed up the screenshot, but you would static in whatever you want the file name then the "formatdatetime(utcnow(),'MM-dd-YYYY') expression would append the date you want, I don't know what you want here, but you would have to mess with expressions to get the name how you want, that example is to just name the file by the current date it runs.
Hope this helps!