I have created a Word template where after I fill in fields in PowerApp, it uses Power Automate to generate a .docx and then convert to the pdf and those are created in Onedrive. Then it copies both of them to a Sharepoint shared folder. But it copies both the .pdf and the .docx. I want one of two things:
1) Either delete the .docx file before the .pdf is copied to the shared folder in Sharepoint,
or
2) Delete the .docx file after it and the .pdf are copied to the shared folder in Sharepoint.
I have two separate flows. One for the Word template, and the other to copy files between OneDrive for Business and SharePoint (which is triggered when a new file appears in a specific OneDrive folder).
Hi @sarahpoulin
If the Flow is moving both files, you should have an action in that is moving not only the .pdf but also the .docx file. You will need to remove this action from your Flow. Also, if you want to delete a file, if the file was created within the same Flow, the delete action won't work.
Best Regards,
--
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions help 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!
What's happening is the .docx file is being created in the Onedrive folde, then converted to pdf in that same folder:
But when new files are created in that same folder, another flow copies those new creations to Sharepoint shared folder (I don't know how to do pdf conversion with Sharepoint, nor how to share a Onedrive folder; don't think either is possible).
You said, "you should have an action in that is moving not only the .pdf but also the .docx file. You will need to remove this action from your Flow." I don't see how I can remove this action. Is there something I can put in the advanced options for "When a file is created"?
Hi @sarahpoulin
On the second Flow, you can input a condition that checks on the File name and if the file contains ".docx" then you can delete the file, if it is not a ".docx" then you create the file on SharePoint which is a ".pdf".
Best Regards,
--
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions help 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!
What is the condition that I need to input? Do I type in an expression? What is the expression?
Did you ever get a resolution to this? I'm trying to do the same thing.
Nope. No resolution. I had to give up for now.
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 | |
58 | |
29 | |
27 | |
25 |