Using Approvals and Microsoft Forms

Options

This isn't exactly RE NXT related but maybe someone know the answer anyway.

I have created a Microsoft Form for the collection of in-kind donation information. I created an approval process for the information to be reviewed before it is entered into RE. This includes uploading a picture of the donated items. So far so good.

I figured out how to use Power Automate to create an Approval with the details from the form. However, I cannot figure out how to get the picture to either attach to the email approval request or the Teams approval request.

I tried a few solutions I found online but they haven't worked. This one Approve a File Uploaded via Microsoft Forms - Power Platform Community suggests using Parse JSON but I don't know enough programing yet to understand how to write the Schema.

This entire approval process will be a 3 part process:

Begin: Form is completed by donor with a volunteer
1. Approval is sent to Volunteer Coordinator to verify donation

2. When the Volunteer Coordinator approves an Approval is sent to Finance to ensure the estimated value is reasonable and adheres to appropriate procedures.
3. When finance approves, the information is copied to an Excel spreadsheet to imported into RE.

Comments

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Susan Fioribello
    for an upload question in MS forms, here's what you need to do in the flow:

    • if the upload question is not required, first start with a condition where the question's response is not empty:
      • Note that 'Get_response_details')?['re09684a5fefe4438b9b02e2713632575'] used anywhere below is the response to the question of the file upload.
    8c595cfcd53680124ab246150762708a-huge-im
    empty(body('Get_response_details')?['re09684a5fefe4438b9b02e2713632575'])
    • then add a Parse JSON action
    8af538d8e5ac9fa79c9a28e5509ef000-huge-im

    Schema:

    {

    "type": "array",

    "items": {

    "type": "object",

    "properties": {

    "name": {

    "type": "string"

    },

    "link": {

    "type": "string"

    },

    "id": {

    "type": "string"

    },

    "type": {},

    "size": {

    "type": "integer"

    },

    "referenceId": {

    "type": "string"

    },

    "driveId": {

    "type": "string"

    },

    "status": {

    "type": "integer"

    },

    "uploadSessionUrl": {}

    },

    "required": [

    "name",

    "link",

    "id",

    "type",

    "size",

    "referenceId",

    "driveId",

    "status",

    "uploadSessionUrl"

    ]

    }

    }

    Then in your approval Details that uses mark down coding, you can do

    if(empty(body('Get_response_details')?['re09684a5fefe4438b9b02e2713632575']),'',concat('[',first(body('Parse_JSON_of_Job_Description_Uploaded'))?['name'],'](',first(body('Parse_JSON_of_Job_Description_Uploaded'))?['link'],')'))

    where the condition will first check the question being “empty” if yes, then empty string ‘’ otherwise, it will use the FIRST uploaded file's information to provide you with a link first(body('Parse_JSON_of_Job_Description_Uploaded'))?['link'] to the file and the filename first(body('Parse_JSON_of_Job_Description_Uploaded'))?['name'] as it was uploaded.

    it “can” be as simple as this, BUT this will be an issue for those who is doing approval but do not have access to the SharePoint/OneDrive location where file is uploaded. So you will have to go to that folder where the file will be uploaded and add the approver as having read access.

    OR, if you want to do more in the flow, you can use Get file sharepoint action to get the uploaded file and attach the file onto the approval steps, or create a share link in the flow and use that sharelink in the approve.

    FYI in case you want to do it, you CAN create the giftinkind gift record directly in the flow if it has gone through all the approval already, so finance doesn't have to do anything

  • @Alex Wong
    Thank you so much for this. It was really helpful.

    I have now built a multi-step approval process where the donation information is approved by multiple departments and the approval has the picture of the donations!

  • @Susan Fioribello
    I know it's been a while, but I am circling back to this project.

    I tried following these instructions, but I could not get it to work. This is the start of my flow. Do I put the condition where the arrow is pointing?

    8331781d9f2207d9a96593993f9c6871-huge-im

    The next part where you talk about the mark down language I am not understanding. Am I now starting two separate branches? Both will go through the same steps except one will not have the attachment?

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Susan Fioribello
    Yes you can put the condition at the red arrow.

    then you will need to condition on if the upload question was answered by using the empty() expression, if not empty, then do the Parse JSON

Categories