I have a flow that needs to delete a .jpg file from a sharepoint library, this library is a photo library.
I am trying to delete via the name of the file.
I thought initially I needed to ge File properties but I cannot find the folder using this action, therefore I am using directly a delete
The File identifier returns the exact name of the file in the library.
When running the flow I get an error 'The response is not in a JSON format'
Solved! Go to Solution.
Thank you for your attempts.
After checking your screenshot, I found the configuration in 'compose2' may have some problem. We need to use output from compose inside.
Here is the detailed example for your reference:
My list to store user account:
My folder to store user photo:
The flow should be:
outputs('Compose')
replace(outputs('Compose_2'),'/','%2F')
Once tested, I'm able to remove according photos and get successful result.
Hope it helps
Best regards,
Anna
Thank you for posting.
According to your description, you would like to delete file for dynamic files but currently got file not found error.
Because when delete file will send an HTTP request to SharePoint, so the Identifier of the file should encode to URL format, so you should replace these "/" to "%2F". So you could use the replace() function to process the file path, for example:
Hope the content above may help you.
Best regards,
Anna
Hi @v-duann-msft ,
Thanks for your reply, I presume the first compose is to get the name of the file, in my case is a Name Surname (from people picker and Display Name), when I enter the Crew Member (Display Name) it pulls in a Aplly Each
I presume on Compose 2 of your example I had to replace Hub with my file path:
I receive the below error when trying to save the flow:
Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The inputs of template action 'Compose_2' at line '1 and column '16525' is invalid. Action 'Apply_to_each_2' must be a parent 'foreach' scope of action 'Compose_2' to be referenced by 'repeatItems' or 'items' functions.'.'.
Thank you for your attempts.
After checking your screenshot, I found the configuration in 'compose2' may have some problem. We need to use output from compose inside.
Here is the detailed example for your reference:
My list to store user account:
My folder to store user photo:
The flow should be:
outputs('Compose')
replace(outputs('Compose_2'),'/','%2F')
Once tested, I'm able to remove according photos and get successful result.
Hope it helps
Best regards,
Anna
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 |
---|---|
29 | |
27 | |
23 | |
17 | |
10 |
User | Count |
---|---|
66 | |
59 | |
29 | |
27 | |
25 |