Hello,
I created a short flow to copy files created on a sharepoint to my Biz One Drive. When adding a contion to copy only files with specific string in the file name, the condition always evaluates to false.
I need only files which contain "Report" in the name to be moved.
Also, I see when modifying the uploaded file on the sharepoint, the flow says "The file is currently checked out or locked for editing by another user. " and doesn't update the file version.
I have changed the trigger step to "When a file is created or modified..." but get the below:
Request to Azure Resource Manager failed with error: '{"error":{"code":"WorkflowTriggerHistoryNotFound","message":"The workflow '32d842d3-507b-4f64-ac3f-6aa83da870ea' trigger 'When_a_file_is_created_or_modified_in_a_folder' history '08586457716245071125362579330CU99' could not be found."}}'.
Any ideas why all the fails ?
Thanks!
Solved! Go to Solution.
Hi @Anonymous ,
The 'Get file content' need to be added before the 'Condition'.
Here the file content is from sharePoint library, so you need use the action 'Get file content (SharePoint)'.
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It may be worthwhile to review the official documentation for Flow conditions, the SharePoint Online Connector documention and a visual explanation of logical expressions.
The problem with the When a file is created trigger, is that it only gives you a handful of operators to work with. Because of this, I almost always use the Get files (properties only) action to expand my list of options.
With that said, I think adding the Get Files (Properties Online) and using the Name string rather than the File name should resolve your issue, as seen below.
Hi @Anonymous ,
I have made a test with the 'When a file is created in a folder' trigger.
However the file name will change to code in this trigger, so you 'Condition' will always false.
I suggest you use the 'When a file is created (properties only)' trigger.
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the suggestion but If I go for "When a file is created - Properties only" then it seems I can't opt for the "File content" when I add the Create file action so is there any other way to retrieve that entire file ?
Thank you!
Hi @Anonymous ,
You can add the 'Get file content' action in you flow to get the file content.
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
so the condition has to be entered after getting the content?
So if I want to save the content to onedrive, i need to Get file content (OneDrive for Business) before the condition?
I never know when to use actions from which app group..
Thanks,
Hi @Anonymous ,
The 'Get file content' need to be added before the 'Condition'.
Here the file content is from sharePoint library, so you need use the action 'Get file content (SharePoint)'.
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
So If I want to save that file to my PC ?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
65 | |
51 | |
30 | |
29 | |
24 |