cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MSDevSP
Frequent Visitor

Get multiple inputs from approvers while approving or rejecting

Hi Experts,

 

I'm building an approval system using powerapps and power automate. I have two requirements for which I couldn't find the solution so far. 

 

1) I'm using power automate to go through various levels of approvers. For a specific approver, instead of approve/reject action, I have to collect the data from the manager/admin.

 

for Example: Powerapps submit button triggers the flow to send the approval emails to approvers. It will go through multiple approvers. (i.e Approver1 -> Approver2).

 

Once the approver2 approved, the flow should go to a manager/admin user. the admin user needs to assign a number (i.e. Card Number) and submit so that the flow can route to the approver 3.

 

I have two issues here.

 

1) In power automate, there is no way to get the custom input from approvers via outlook actionable message/adaptive cards. only available input control is "comments" from approvers. Is there any way to send an email to approver with a text box called "card number" and "submit" button. the user should be able to enter the card number and submit from outlook.

 

2)  As far as I know, we cant programmatically approve or reject the power automate approval step from powerapps. If this is possible, we can send a powerapp link to approvers and approvers can click on the link and go to power apps then input the required data and submit. from powerapps, we need to update the specific stage of the flow and continue the rest of the flow. Is this possible in powerapps/power automate?

 

Note: If anyone is familiar with K2 five workflows,  you know that we can update the workflow stages using a custom form with approve/reject buttons. while approving you can fill out the required forms and submit. the form data will be passed to workflow.

 

Anyone went through these challenges in powerapps/power automate, Please let me know if there is any solution for this issue.

 

Thank you!

 

 

 

 

 

3 REPLIES 3
Jeff_Thorpe
Super User
Super User

You can send a custom adaptive card using the Send Email action in the O365 Outlook connector. The key is that you will need to put the body field into code view ("</>") and then add some script tags with the adaptive card JSON between them. 

<script type="application/adaptivecard+json">
{adaptive card JSON goes here }
</script>

Quick Poll Example:

<script type="application/adaptivecard+json">
{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "Container",
            "style": "emphasis",
            "items": [
                {
                    "type": "TextBlock",
                    "text": "Quick Poll",
                    "wrap": true
                }
            ],
            "padding": "Default"
        },
        {
            "type": "Container",
            "id": "d96d06ec-2a33-c8cc-4698-430ae87f772f",
            "padding": "Default",
            "items": [
                {
                    "type": "TextBlock",
                    "size": "Medium",
                    "weight": "Bolder",
                    "text": "Take 2 minutes to help us plan the upcoming conference",
                    "wrap": true
                }
            ],
            "spacing": "None",
            "separator": true
        },
        {
            "type": "Container",
            "id": "885220a9-5ab1-95dd-5b66-20f42c452fa9",
            "padding": "Default",
            "items": [
                {
                    "type": "TextBlock",
                    "weight": "Bolder",
                    "text": "Where should we host the conference?",
                    "wrap": true
                }
            ],
            "separator": true,
            "spacing": "None"
        },
        {
            "type": "Container",
            "id": "10017c5a-5ee9-46c5-537a-bdd9ab61225c",
            "padding": {
                "top": "None",
                "bottom": "Default",
                "left": "Default",
                "right": "Default"
            },
            "items": [
                {
                    "type": "Input.ChoiceSet",
                    "id": "Options",
                    "spacing": "None",
                    "placeholder": "Placeholder text",
                    "choices": [
                        {
                            "title": "Radisson",
                            "value": "Radisson"
                        },
                        {
                            "title": "Hilton",
                            "value": "Hilton"
                        },
                        {
                            "title": "Sheraton Downtown",
                            "value": "Sheraton Downtown"
                        },
                        {
                            "title": "W Downtown",
                            "value": "W Downtown"
                        },
                        {
                            "title": "Clarks",
                            "value": "Clarks"
                        }
                    ],
                    "style": "expanded"
                }
            ],
            "spacing": "None"
        },
        {
            "type": "Container",
            "spacing": "None",
            "items": [
                {
                    "type": "TextBlock",
                    "text": "Other:",
                    "wrap": true,
                    "horizontalAlignment": "Left"
                }
            ],
            "padding": {
                "top": "None",
                "bottom": "None",
                "left": "Default",
                "right": "Default"
            }
        },
        {
            "type": "Container",
            "id": "3734939f-dd4d-79be-cf3c-2ad791f382ba",
            "padding": {
                "top": "Default",
                "bottom": "None",
                "left": "Default",
                "right": "Default"
            },
            "items": [
                {
                    "type": "Input.Text",
                    "id": "Suggestions",
                    "placeholder": "Have another suggestion?"
                }
            ],
            "spacing": "None"
        },
        {
            "type": "Container",
            "id": "a27409f1-a48e-982f-8e26-594bdd1468e8",
            "padding": "Default",
            "items": [
                {
                    "type": "ActionSet",
                    "horizontalAlignment": "Left",
                    "actions": [
                        {
                            "type": "Action.Http",
                            "title": "Submit",
                            "method": "POST",
                            "url": "https://www.microsoft.com",
                            "body": "{Option: {{Options.value}}, SuggestionText: {{Suggestions.value}}}",
                            "isPrimary": true,
                            "style": "positive"
                        }
                    ]
                }
            ],
            "spacing": "None"
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.0",
    "padding": "None"
}
</script>

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thanks for your reply. I tried your sample code. I can see the field in the email (screenshot attached below). But how can we pass the responses back to workflow?  I need to use the inputs/responses to email to the next approver.

 

from your code, I can see that the submit button calls a POST request using a different URL. does that mean, we have to submit the data via another API and store it somewhere and retrieve it from the flow again to pass to the next approver?  

 

MSDevSP_0-1632043146733.png

 

 

Jeff_Thorpe
Super User
Super User

Sorry, the example I provided won't return the results back to a waiting flow like the approval connector. There is a premium connector called "CardPlatform Adaptive Cards" that sounds like it can send a custom adaptive card and wait for a response. I have not used it and it looks like it requires a subscription but you can get a free trial subscription to try it out.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,605)