cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gabriel_Follone
New Member

Validate email in response to send email with options

Hi Guys,

I'm trying to create a custom approval route that generates some actions after the user selects "approved" or "rejected", the trigger is when a user uploads a file to a library in sharepoint, the problem I'm having is creating an error handling , I don't want the user to pass the email with options to another user and that other user is able to approve or reject, the fact is that I create the flow and email with options and regardless of who I forward this email to and what the colleague squeezes the flow is always me pressing the button, I found that this error occurs with the html messages if in the flow I put the colleague's direct email and he approves or rejects it through the web outlook, it works normally, but not in the outlook 2016, because message that appears there is HTML, not if the question is silly or if there is a way to create a list of trusted contacts within the flow and validate it out there, but I am breaking my head with this, if anyone can help I would appreciate it.

 

Gabriel_Follone_0-1616425999986.png

Inside Do until

Gabriel_Follone_1-1616426073538.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

@Gabriel_Follone  i would suggest that add initialize variable action at top of your flow and name it as FirstApprovalDecision and set type string. Now under condition 1 -> Yes branch set the variable value using Set Variable action and set the value to "Approved" and in same way under No branch set variable value to Rejected.

 

Now in condition 2 use the variable on left side of condition and on right side of condition use "Approved" string. This should make the condition 2 work as expected 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

6 REPLIES 6
annajhaveri
Super User
Super User

@Gabriel_Follone  any reason why you are not using Start and Wait for approval action instead?

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
Gabriel_Follone
New Member

I can't create an order, a hierarchy in the approval, only if I make an approval for each answer to create the order, I just wanted to know if there would be a way to validate the email, it would be less complex for traceability, but if not possible, I will have to use the approvals.

Or if you can do what I said with approvals without having to create one by one please show me, I really don't know, Thanks!

@Gabriel_Follone  okay, so are you facing errors in current flow? To check if UserEmailAddress is an authorized approver, you can create a list in SharePoint and add approvers to that list, and in the flow you can get data from list and check if UserEmailAddress is one of the user from approvers list or not or you can create M365 group for approvers, and then get members of that group to validate if the UserEmailAddress  one of the member of that approver group or not.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

It doesn't work properly, the safest thing is to use approvals yourself, but I still need help, the flow is as follows:

File created in sharepoint library >> get my profile >> start and wait for an approval >> create item >> apply to each> condition (if Response approval == Approved)> if yes = update a value in the Approved column? (yes / no) for yes> if no = update the same place as no >> get item >> condition 2 (if approved? == Yes)> if yes = start another approval> if no = terminate = canceled.

The problem is in condition 2, the flow works normally until then, but when I analyze it there is a logic error that says that there are no values ​​to be compared in condition 2, I tried to change the comparison value from "Yes" to "True ", but it still doesn’t work, doesn’t it seem to pull the value from the Approved cell? yes / no, can you help me? I do not put the terminate inside the first applyto each because Power Automate doesn’t allow me, if I could do the condition of whether approved or not the first approval outside apply to each would solve the problem too, but when I create the condition (if Response approval == Approved) it automatically creates the apply to each.

 

Gabriel_Follone_0-1616511587204.png

 

@Gabriel_Follone  i would suggest that add initialize variable action at top of your flow and name it as FirstApprovalDecision and set type string. Now under condition 1 -> Yes branch set the variable value using Set Variable action and set the value to "Approved" and in same way under No branch set variable value to Rejected.

 

Now in condition 2 use the variable on left side of condition and on right side of condition use "Approved" string. This should make the condition 2 work as expected 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
Gabriel_Follone
New Member

Thank you very much @annajhaveri ! it worked, for those who want to see the result it was this one, just replicate to a larger chain of approval, and the tracking will be done in a list on the sharepoint updating approver by approver and in the end if everything is true, the status column will be Approved!

 

Gabriel_Follone_0-1616605189477.pngGabriel_Follone_1-1616605195199.pngGabriel_Follone_2-1616605198124.pngGabriel_Follone_3-1616605199184.png

 

 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,487)