web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Answered

Approval Workflow

(2) ShareShare
ReportReport
Posted on by 8
Hi Everyone, 
 
I'm using power apps to build a POREQ approval workflow.  I'm pretty happy with it but I'm running into problems leveraging the Power Automate Approval.  
 
Here is where I'm struggling:
1) I'm not sure how to attach multiple files to the approval.  Prior to triggering this workflow, I have another workflow to upload the documents to a document library.  I'm not sure how to link this document to the approval workflow to bring in the attachments because the ID.  
 
It seems like it would be pretty easy to do
 
However, my issue is that my attachments are in a document library and not a list and I'm not sure what the ID will be because it's being created in the flow triggered before.  However, I will be able to tag it with like POREQ0001. 
 
2)  The details of the approval workflow should have a table with the header and line level details looking like this.  
 
VENDOR: Amazon
Total Price: 10,000
 
Item:   Price  Qty  Total 
Glue    1        1       1
Tape    1       1      9,999
 
I can do the top part.  I'm not sure how to take the table and add it to my approval workflow.  
 
I'm sure this isn't hard but it's difficult for me.  Any help is appreciated!
Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at
     
    I explained both things in articles some time ago:
     
     
    ----------------------------------------------------------------------------------
    Did the answer solve your problem? Please click "Does this answer your question" and give it a like to help others in the community find the solution too!
     
    You can find more of my solution on the blog: https://tomriha.com
  • DY-10041741-0 Profile Picture
    8 on at
    Hi Tom, 
     
    Great links!  I have a few questions for you.  
     
    Multiple File Attachments: Here are my challenges using your method.  The first issue is that the get attachments is for files saved in a sharepoint list.  My documents are being saved in a document library.  The second issue is that I think you use the ID to determine what attachments to use.  I'm not going to know what the ID is for the document library as the items are being created right before I grab it.  
     
    NOTE: This is the first time I have ever seen anyone upload documents to a sharepoint list.  It seems like the best solution is to capture the data in Power Apps and create the record in using Power Automate (which I did) then attach the files to that list using Power Automate (which I don't know how to do) then I can follow your process to attach them to my approval.  
     
    I'll look into how to do that but if anyone has any ideas that would be helpful. 
     
    Table Details: I think this process makes sense and I can do it.  I just need to figure out how to get that information into Power Automate from Power Apps.  Thanks a lot!
     
  • DY-10041741-0 Profile Picture
    8 on at
    Hi.  I think I'm pretty close.  I just need a little more help to get this over the finish line.  Okay, so I updated my flow.
     
    1. PowerApps - This gives me the information in my flow.
    2. Initialize Variable - This is just formatting the approval stuff. 
    3. Create File - This takes the uploads and saves it into the document library.  
    4. Update File Property - This takes the newly created file and adds in some metadata.
     
    Here is where I think I'm struggling
    5. Initialize Variable 2 - This is where I create all attachments section. Name: AllAttachments Type: Array
    6.  Get File Content (I don't really understand what this does) - I go to my document library and I grab the identifier.  
    7. Apply to each - using the identifier
    8. Append to array variable:  Name: All Attachments, Value Section: {Name: Display name, Content: Content}
    9. Create Item - This is creating the item in the sharepoint list.  
    10.  Start and wait for approval.  Attachments = All Attachments
     
     
  • DY-10041741-0 Profile Picture
    8 on at
    @tom_riha, I think I have it.  I followed your instructions.  Unfortunately, since my item is using a document library I'm running into a small issue.  The files don't have the proper attachments in them.  
     
    This is confusing to me because the content does have the extension on it.  
     
    Do you have any suggestions as to why I'm having this issue?
  • Verified answer
    tom_riha Profile Picture
    10,185 Most Valuable Professional on at
    @DY-10041741-0, if it's not file attachments then use the 'Get files (properties only)' with some filter to get the related files and the it's the same. Just query a library instead of attachments. You can search the files by file name or some other column in the document library - I guess you must have the files connected to items using some ID column.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard