cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mycrosoft
Helper I
Helper I

RE: Creating a multi-step approval for documents, then convert approved documents into PDFs

Hi there,

 

I'm a brand new user to Power Automate / Flow and have been using it to experiment creating different basic flows over the past week.

 

I've managed to create a multi-step approval flow that calls on 2 approvers to approve a document that resides in a "Draft" folder. Both must approve before the document is then automatically moved to an "Approved" folder. I create a separate flow that automatically converts documents into a PDF in a specified folder. 

 

What I want to do is somehow combine the 2 flows together so that once a document is approved by both users and automatically moved to the designated folder (Approved), it is then automatically converted into a PDF immediately in that folder, all in one step. 

 

I tried recreating the document-to-PDF conversion flow within the multi-step approval flow with no success. I'm still trying to understand how Power Automate works and learn what the different actions and triggers mean. So I don't know if I'm missing anything, or if combining the two flows together is simply not possible. Any help for this noob would be much appreciated!

 

Eddie

 

Doc-to-PDF FlowDoc-to-PDF Flow

 

Multi-Step Approval (with Doc-to-PDF) FlowMulti-Step Approval (with Doc-to-PDF) Flow

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hello @Mycrosoft ,

when you hover on the dynamic content, does it have the correct outputs(...)? It should be always the previous action.

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

Hello @Mycrosoft ,

the content approval must always follow the same order of statuses: Draft -> Pending (in PA I think it's called Submit) -> Approved/Rejected.

Draft can be switched only to Pending, and only Pending can be switched to Approved/Rejected.

Keep in mind that every update in the item/document will change the status back to Draft, therefore, if you're updating the item/document, you'll need 2 actions to 'Set content approval status', one to change it from Draft into Pending and another one to change it from Pending to Approved.

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

10 REPLIES 10
tom_riha
Super User
Super User

Hello @Mycrosoft ,

on the first look your flow looks fine, what problem does it have?

The only issue I can now imagine is that in the 'Get file properties 2' you must use output of the 'Move file' action, not from the trigger. The file is moved at that moment so it's not in the original location under the original ID.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Thanks for replying, @tom_riha. After a file is approved, it automatically moves from the 'Draft' folder to the 'Approved' folder without any issues. Once it is in the 'Approved' folder, however, nothing happens. The document doesn't automatically convert to a PDF. To your point of using the output of the 'Move file' action instead of the original location, what would be the appropriate dynamic content action to use? Below is what I have at the moment. I've tried a few different options in the 'Get file properties' and 'Get file content' with no success. The answer is probably obvious but somehow it's eluded me! 

 

Multi-step approvalMulti-step approval

It doesn't return any error? All the actions have green checkbox, but nothing happens?



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

@tom_riha , there is an error in the Condition (action failed) as a result of an error under the 'Get file content' action. I tried different actions in "Get file content' but nothing seems to work. I don't know why I didn't post the error earlier! Here is the screenshot:

 

ErrorError

@Mycrosoft I'd check the dynamic content you use in the actions, you can hover on it to see which action outputs it is. In 'Get file properties' it should be the 'ItemId' from 'Move file' (as the description says "...used to Get or Update file properties...").

image.png

In 'Get file content' it should be 'Identifier' from the 'Get file properties' above it (in your case 'Get file properties 2').

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Thanks for the input, @tom_riha. It just so happens that, after sending the original screenshot of the flow, among the different action combinations I tried next were ItemId and Identifier under Get file properties and Get file content, respectively, and it didn't work. Am I missing some extra action after the file is moved from one folder to another? 

Hello @Mycrosoft ,

when you hover on the dynamic content, does it have the correct outputs(...)? It should be always the previous action.

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

@tom_riha that did the trick! I hovered over each action's dynamic content to check the outputs and found a few that were pointing to the wrong action (i.e., the earlier action and not the immediately previous one, such as Get file properties when it should have been Get file properties 2). I don't know why I never looked closer into the outputs. It's so obvious now, LOL. Clearly I have a lot to learn! Maybe it's time I check out your blog for Power Automate solutions for rookies like me. Thanks again!! 🤗

@tom_riha , Hi Tom (or anyone out there). So after being able to convert a document to a PDF that's been moved from one folder to another as per the flow shown in my previous posts above, I'd like to set the flow where it automatically changes the Approval Status column from "Draft" or "Pending" to "Approved". I've been playing around with the "Set Content Approval Status" action and created a separate flow that can do this (see attached image). However, I'm not sure how to integrate it into my existing flow. I've watched a few video tutorials for help and so far nothing's come up. Any pointers would be greatly appreciated. Thanks!

 

Changing Approval Status columnChanging Approval Status column

Hello @Mycrosoft ,

the content approval must always follow the same order of statuses: Draft -> Pending (in PA I think it's called Submit) -> Approved/Rejected.

Draft can be switched only to Pending, and only Pending can be switched to Approved/Rejected.

Keep in mind that every update in the item/document will change the status back to Draft, therefore, if you're updating the item/document, you'll need 2 actions to 'Set content approval status', one to change it from Draft into Pending and another one to change it from Pending to Approved.

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Helpful resources

Announcements

Power Platform Connections - Episode 7 | March 30, 2023

Episode Seven of Power Platform Connections sees David Warner and Hugo Bernier talk to Dian Taylor, alongside the latest news, product reviews, and community blogs.     Use the hashtag #PowerPlatformConnects on social media for a chance to have your work featured on the show.  

Announcing | Super Users - 2023 Season 1

Super Users – 2023 Season 1    We are excited to kick off the Power Users Super User Program for 2023 - Season 1.  The Power Platform Super Users have done an amazing job in keeping the Power Platform communities helpful, accurate and responsive. We would like to send these amazing folks a big THANK YOU for their efforts.      Super User Season 1 | Contributions July 1, 2022 – December 31, 2022  Super User Season 2 | Contributions January 1, 2023 – June 30, 2023    Curious what a Super User is? Super Users are especially active community members who are eager to help others with their community questions. There are 2 Super User seasons in a year, and we monitor the community for new potential Super Users at the end of each season. Super Users are recognized in the community with both a rank name and icon next to their username, and a seasonal badge on their profile.  Power Apps  Power Automate  Power Virtual Agents  Power Pages  Pstork1*  Pstork1*  Pstork1*  OliverRodrigues  BCBuizer  Expiscornovus*  Expiscornovus*  ragavanrajan  AhmedSalih  grantjenkins  renatoromao    Mira_Ghaly*  Mira_Ghaly*      Sundeep_Malik*  Sundeep_Malik*      SudeepGhatakNZ*  SudeepGhatakNZ*      StretchFredrik*  StretchFredrik*      365-Assist*  365-Assist*      cha_cha  ekarim2020      timl  Hardesh15      iAm_ManCat  annajhaveri      SebS  Rhiassuring      LaurensM  abm      TheRobRush  Ankesh_49      WiZey  lbendlin      Nogueira1306  Kaif_Siddique      victorcp  RobElliott      dpoggemann  srduval      SBax  CFernandes      Roverandom  schwibach      Akser  CraigStewart      PowerRanger  MichaelAnnis      subsguts  David_MA      EricRegnier  edgonzales      zmansuri  GeorgiosG      ChrisPiasecki  ryule      AmDev  fchopo      phipps0218  tom_riha      theapurva  takolota     Akash17  momlo     BCLS776  Shuvam-rpa     rampprakash  ScottShearer     Rusk  ChristianAbata     cchannon  Koen5     a33ik  Heartholme     AaronKnox  okeks      Matren   David_MA     Alex_10        Jeff_Thorpe        poweractivate        Ramole        DianaBirkelbach        DavidZoon        AJ_Z        PriyankaGeethik        BrianS        StalinPonnusamy        HamidBee        CNT        Anonymous_Hippo        Anchov        KeithAtherton        alaabitar        Tolu_Victor        KRider        sperry1625        IPC_ahaas      zuurg    rubin_boer   cwebb365   Dorrinda   G1124   Gabibalaban   Manan-Malhotra   jcfDaniel   WarrenBelz   Waegemma   drrickryp   GuidoPreite    If an * is at the end of a user's name this means they are a Multi Super User, in more than one community. Please note this is not the final list, as we are pending a few acceptances.  Once they are received the list will be updated. 

Register now for the Business Applications Launch Event | Tuesday, April 4, 2023

Join us for an in-depth look into the latest updates across Microsoft Dynamics 365 and Microsoft Power Platform that are helping businesses overcome their biggest challenges today.   Find out about new features, capabilities, and best practices for connecting data to deliver exceptional customer experiences, collaborating, and creating using AI-powered capabilities, driving productivity with automation—and building towards future growth with today’s leading technology.   Microsoft leaders and experts will guide you through the full 2023 release wave 1 and how these advancements will help you: Expand visibility, reduce time, and enhance creativity in your departments and teams with unified, AI-powered capabilities.Empower your employees to focus on revenue-generating tasks while automating repetitive tasks.Connect people, data, and processes across your organization with modern collaboration tools.Innovate without limits using the latest in low-code development, including new GPT-powered capabilities.    Click Here to Register Today!    

Check out the new Power Platform Communities Front Door Experience!

We are excited to share the ‘Power Platform Communities Front Door’ experience with you!   Front Door brings together content from all the Power Platform communities into a single place for our community members, customers and low-code, no-code enthusiasts to learn, share and engage with peers, advocates, community program managers and our product team members. There are a host of features and new capabilities now available on Power Platform Communities Front Door to make content more discoverable for all power product community users which includes ForumsUser GroupsEventsCommunity highlightsCommunity by numbersLinks to all communities Users can see top discussions from across all the Power Platform communities and easily navigate to the latest or trending posts for further interaction. Additionally, they can filter to individual products as well.   Users can filter and browse the user group events from all power platform products with feature parity to existing community user group experience and added filtering capabilities.     Users can now explore user groups on the Power Platform Front Door landing page with capability to view all products in Power Platform.      Explore Power Platform Communities Front Door today. Visit Power Platform Community Front door to easily navigate to the different product communities, view a roll up of user groups, events and forums.

Microsoft Power Platform Conference | Registration Open | Oct. 3-5 2023

We are so excited to see you for the Microsoft Power Platform Conference in Las Vegas October 3-5 2023! But first, let's take a look back at some fun moments and the best community in tech from MPPC 2022 in Orlando, Florida.   Featuring guest speakers such as Charles Lamanna, Heather Cook, Julie Strauss, Nirav Shah, Ryan Cunningham, Sangya Singh, Stephen Siciliano, Hugo Bernier and many more.   Register today: https://www.powerplatformconf.com/   

Users online (2,400)