Building a flow that creates a new folder in the Sharepoint Shared Document Library.
To do that it seems you need to create a file with a new folder path as a work around since Flow doesn't support creating folders (unbelieveable).
While this workaround works, you're left with a useless file.
I want to delete that file once it is created. Seems simple right?
I have created this simple flow, which works.
- When new list item is created
- Create File
- Update item with path to new folder
When I try to add 'delete file' I use the same syntax to point to the file but I get an error saying the file is not found.even though error log displays the correct path to the file.
I assume this is because when the 'delete file' action occurs, the file has not yet been created???
If this is the case, how can I wait until the file is created to initiate the 'delete file' action? I have tried adding as much as a 30 second delay between 'create file' and 'delete file' actions with no luck.
This shouldn't be so difficult to simply create a folder, just saying..
Here is the error log.
Hi @KCC
The problem are in the 'Delete action' this not transform the string to uri, it is a bug.
But we have a way to workarround this, follow this steps:
1 - Copy all content that you put in 'File Identifier' field
2- Open the 'Expression' tab and paste the content in field
3- remove the '@' and '{' and '}' from the text
- in my example the first content was:
/Anotaes do Comercial/@{body('Criar_arquivo')?['Name']}/test.txt
after :
/Anotaes do Comercial/body('Criar_arquivo')?['Name']/test.txt
4 - put it inside an encodeUriComponent('PUT THE LAST STEP RESULT HERE')
5 - Save and Done!!!
Hope this helps!
Best Regards,
Gustavo Moraes
Gustavo Moraes, o astronauta brasileiro do Flow!
When this bug will be solved ???
I'm trying Gustavo's suggestions without any positive results !!!
It seems that now MS Flow (now) put automatically the encodeUriComponent function, but I was unable to save my workflow without errors.
My File Identifier is "/Documenti SITG/[NAME]" (where [NAME] is the Dynamic Content tag.
How can I convert it in the right way for the Delete File action ?
Someone could help me ???
Thank you very much.
Riccardo Germinario
Italy
When you say 'put it inside encodeUriComponent - where do you do that within the flow?
Thanks.
I guess in your example you are referring to the following expression, right?
encodeUriComponent(concat('/Anotaes do Comercial/',body('Criar_arquivo')?['Name'],'/test.txt'))
Proud to be a Flownaut!
Yes @efialttes
Gustavo Moraes, o astronauta brasileiro do Flow!
Just to confirm with anyone watching this thread from the Microsoft Team, this still seems to be an issue.
But hey... they just announced more new connections with obscure 3rd party software that hardly anyone likely uses.
Something like being able to create a folder or delete a file required to be created as a work around to creating a folder...
or how about creating a subsite using a Flow?
Way to address basic use cases MS.
*smh*
When I try this, I get "invalid expression".
User | Count |
---|---|
88 | |
39 | |
23 | |
20 | |
16 |
User | Count |
---|---|
127 | |
49 | |
46 | |
31 | |
25 |