cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pardee
Regular Visitor

Sending multiple upload FIELDS from forms as outlook file attachments

I have a form using an upload field and I understand the method using arrays to send multiple attachments and it runs perfectly fine.

 

However what I would like to do is have several upload sections through the form sent as attachments 

 

Example:

Section 1

Name

Date

Upload Field 1

 

Section 2

Address

Phone

Upload Field 2

 

And then in my email have attachments from both Upload field 1 and upload field 2

 

Current working version with ONE upload field (upload field named "Question")

Spoiler
Pardee_0-1660052559895.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
manuelstgomes
Community Champion
Community Champion

Hi @Pardee 

 

I would initialize a variable of type array and append all elements (from both arrays) to it.

 

Then use that variable as the parameter for the attachments.

 

Cheers
Manuel

------------------------------------------------------------------
If I have answered your question, please mark it as "Accept as Solution." It will help other members find the solution faster. If you like my response, please give it a Thumbs Up. ?
Otherwise, reply to it, and the community will do its best to help you.

View solution in original post

5 REPLIES 5
manuelstgomes
Community Champion
Community Champion

Hi @Pardee 

 

It's possible to have multiple upload fields in your forms. Just add them with different questions:

Screenshot 2022-08-09 at 16.43.48.png

 

After this, you have the fields to parse in Flow. They will appear in Power Automate with the same names as the questions, but I think they will always be arrays of elements, not only one element. I haven't tested this, but I think this will happen even if you define that you only want one file.

 

Is this what you need?

Cheers
Manuel

------------------------------------------------------------------
If I have answered your question, please mark it as "Accept as Solution." It will help other members find the solution faster. If you like my response, please give it a Thumbs Up. ?
Otherwise, reply to it, and the community will do its best to help you.

 

 

I am capturing the file from the second upload I just simply need to add it to the attachments/email

 

This is my form

Pardee_1-1660057799922.png

 

 

This is the array used for the first upload field, only one variable is allowed per attachment which means I can not duplicate process and add another array and the image from the second upload is not included with the flow as is. (Note the full flow is in OP)

Pardee_2-1660057862927.png

 

 

This is the JSON Parse Schema I have

 

{
    "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"
        ]
    }
}

 

 

 

 

Is there something I can do to include the additional upload in this array?

 

In the end I anticipate about 5 separate upload fields required on this form I would like to be attached or included inside the email

 

(If I call the element question 2 in the body of the email I get all the metadata, if I could clear that out and take the link and have html format it into an image that would work as well)

 

manuelstgomes
Community Champion
Community Champion

Hi @Pardee 

 

I would initialize a variable of type array and append all elements (from both arrays) to it.

 

Then use that variable as the parameter for the attachments.

 

Cheers
Manuel

------------------------------------------------------------------
If I have answered your question, please mark it as "Accept as Solution." It will help other members find the solution faster. If you like my response, please give it a Thumbs Up. ?
Otherwise, reply to it, and the community will do its best to help you.

Both have been initialized as arrays but are being output to a string when I am trying to declare them as an array. Am I missing a step, do I need to concatenate or something? I am unfamiliar with the visual syntax flows use 

 

Pardee_0-1660062572403.png

 

Pardee_1-1660062629542.png

 

manuelstgomes
Community Champion
Community Champion

Hi @Pardee 

 

You have two array variables (The "multiple attachments" and "question 2"). Remove one of them and attach all (from questions 1 and 2) to the same variable. Then use that one on the email.

 

Cheers
Manuel

------------------------------------------------------------------
If I have answered your question, please mark it as "Accept as Solution." It will help other members find the solution faster. If you like my response, please give it a Thumbs Up. ?
Otherwise, reply to it, and the community will do its best to help you.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (1,657)