I have a SharePoint list that contains a field named 'isCompleted' and is set to 'No' by default.
When this field is set to 'Yes' I want flow to get the item's attached files and copy it to a specific library that is also based on a field in my list.
Appreciate any help that I can get.
Thank you.
Hi @RH-MP
First, you need to have the file extension (.pdf, .jpg etc) for the attachment.
Second, you can add a dynamic value to the attachment so that every attachment gets a new name. (You can use the utcnow() as a part of the naming convention and this will add the date time stamp of when the attachmemt was added)
Hope this Helps!
It just came to me right now, the one that I made is good for 1 is to 1 (1 attachment ot 1) but I have this attachment naming convention that is based on the item fields:
Whatever the filename of the attachment, once it is saved, it will create a file on the specified directory with a new file name which would be Description_Client_Module_DocType_AccountNumber. Problem is if I have multiple attachments, it will overwrite all of the other files and save the last file.
Made it work:
Set the fileExtension variable as:
HI @RH-MP
Could you post a screenshot of that? We might be able to assist you better that way. In the create file action, you need to put the file extension in the filename itself. so if it is a pdf you are getting from somewhere and creating afile so the filename would be filename.pdf (Makes sense?)
Hi @yashag2255
Appreciate it.
Yes, the workaround that you stated is what my flow currently does. Guess I have to stick with that.
Another thing, I made use of the 'Create a file' step and it's working although the file type is .file instead of the original file type I copied it from. Do you happen to know any solution for this?
HI @RH-MP
Currently a trigger based on a change of a particular field of a sharepoint list item is not supported in flow. You can submit an idea here:
https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas
Alternatively, as a workaround, you have mentioned the field is set to No by default so you can use the trigger when an item is created or modified and after the trigger, place a condtion to check if this field is yes and then run the flow else terminate.
Hope this helps!!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492