I'm new to Power Automate and looking for assistance! I'm trying to build a "Picture of the Day" on my SharePoint intranet homepage (modern communication site), and looking for a way with Power Automate. I had previously connected a list webpart and had a view built to show based on a column named "Show Date", but the image is too small. I'm hoping to use the column "show date" and make it so that a flow would copy a file to a new document library based on the show date matching [today]. Then have the flow rename the file to "picture of the day", so that the image viewer webpart would still be connecting to the same URL, and the image associated would rotate each day.
Below are my steps so far.
1. Run the flow every day at midnight
2. Delete the existing Comic of the Day from the Shared Documents library. (Doing it this way, so that when I hyperlink to this image on the homepage, the hyperlink will remain the same and not require me to update the homepage webpart.)
3. Get the properties of the Comic of the Day library?
4. Attempting to grab the file properties?
5. Applying the condition to only run for when: Show Date, is equal to, formatDateTime(utcNow(), 'yyyy-MM-dd')
6. If yes it matches the show date from above, copy the file to the Shared Documents folder.
7. Update the file properties to the name of "Comic of the Day". (Again doing this to maintain the hyperlink on the homepage to be the same.)
*in copy file 2 above, It shows copying it to /homepage comic folder, I updated this to send to the /documents folder.
I have the delete file working, but can't get it to grab the files.
Any help or pointers is greatly appreciated!! Or any other ideas/ways to achieve the end result.
Hey there, I like the approach. Here's a couple of things I might try:
You've probably already considered this, but if your process deletes the current image then eventually your folder will be empty (unless you add new ones). You might consider renaming the old file to yesterday's date or something like that.
Another thing that might be fun would be to get the comic on the fly through a Bing image search or something like that. Totally up to you, just throwing out some ideas.
Keep us posted on your progress, good luck!
If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.
I appreciate the response and the ideas. Unfortunately I'm still unable to make this one work. I consistently get the flow to delete the existing file in my Document Library, no problems there. I just can't get it to read the unique date field, and based on a match of date field = Today's date, then copy the file to the document library and then change the name. I'm assuming once I got the match and copy to happen, the change title of document would be simple.
As far as changing the name vs. deleting, I've got a picture library with 2 years worth of comics, after that I can change the dates and cycle through them again. I wish I could do a Bing search, unfortunately these specific images are the ones that need to be on the site.
Thanks again for all the input, anything else would be appreciated.
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Many congratulations to the Season 1 2021 Flownaut Crew!
Check out our new profile badges recognizing authored solutions!
Check out the community blog page where you can find valuable learning material from community and product team members!