Jul 15 2020 10:05 AM
Jul 15 2020 10:05 AM
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 channel and did some test and when the report comes out it goes to the channel. I was wondering if there is a way for the attachment in the report not to get this weird strand of numbers listed in the image below but if it could just auto add the date to that attachment instead. This will make tracking the report easier for us under the files tab of the channel.
Jul 27 2020 01:00 PMSolution
Jul 27 2020 01:05 PM
@Chris Webb 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 01:12 PM
Jul 27 2020 01:14 PM
@Richard_Maltese here is the cap of the SharePoint http call action you can use to rename files.
Jul 27 2020 01:16 PM
Jul 28 2020 08:34 AM
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!
Aug 12 2020 11:31 AM
@Chris Webb I hate to bug you but I think i messed something up here. Below is my flow. However when testing or running it, it wont work i get the second image below. It shows it was successful but doesnt seem to be based off the message on the Yes Condition.
Aug 12 2020 12:05 PM
Aug 12 2020 12:44 PM
@Chris Webb Thanks for taking more time to help with this. So I'm checking it but the file name it returns is UmVwb3J0IFN1YnNjcmlwdGlvbnNfMTA5NDY1MjEzNS54bHN4 and the file identifier is showing %252fShared%2bDocuments%252fNEST%2bSubcription%2bReport%252fEmail%2bMessages%252fReport%2bSubscriptions_1094652135.xlsx. Unfortunately I'm not sure what would need to be adjusted.
Aug 12 2020 12:50 PM
Aug 12 2020 02:37 PM
Okay trying what you recommended however it requires and ID under the get file properties so when digging into that one thing I found said to get the metadata file before the get file properties but that then wants map to a specific file in the folder. Maybe there is something I'm over looking at this step. And every time I add that in I get the last screen shot here. From what i read that means somethings is broken in the process from the trigger to that next step.
Aug 12 2020 02:42 PM
Aug 12 2020 02:59 PM
@Chris Webb That doesnt let me get past the trigger it give me the enter a sharepoint message i posted above.
Aug 12 2020 03:08 PM
Aug 12 2020 03:27 PM
Creating a new one fixed that one message however still looks like its failing.
I added back in the get file properties under the trigger as well and that still failed. I tried with Name and file name with extension.
Aug 12 2020 03:30 PM - edited Aug 12 2020 03:30 PM
It says Name in the condition, run it and see what Get File Properties is returning for those fields. (filename with extension)
Aug 12 2020 03:45 PM
Tried that with the with and with out the get file properties and still go the same result.
Jun 22 2021 07:14 AM
I am wondering why Teams adds the numbers in the first place. It would be great if it added nothing or maybe a timestamp (YYYYMMDDHHMMSS), instead of what looks like a meaningless string of digits.