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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / email 2 types of attac...
Power Automate
Answered

email 2 types of attachments

(0) ShareShare
ReportReport
Posted on by 242

Hi, 

 

I have asked this before but no sollution yet.

 

i have a flow which generates 2 types of attachements.

one made with Create and Get file content

one made with initialze variable and Append to array

 

Both works fine, i get attachements but i cant attach them both in 1 email.

 

2 types of attatchment, dont work2 types of attatchment, dont work

 

attachment2.PNG

Categories:
I have the same question (0)
  • ChristianAbata Profile Picture
    8,953 Most Valuable Professional on at

    @Yvonzim cloud you show me what do you have in attachment array?

  • Yvonzim Profile Picture
    242 on at

    @ChristianAbata

    attachment_array.PNG

    sepperate attachments work.

    Or the file created with attachmentArray

    Or the files created with Create command

    attachment_create.PNG

     

    But not both files in one email 😞

  • ChristianAbata Profile Picture
    8,953 Most Valuable Professional on at

    hi @Yvonzim  this is becouse the file content needs this squema

     

    {
     "$content-type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
     "$content": "UEsDBBQABgAIAAAAIQDi"
    }
    

     

    and you are sending just the Content-byte, and remenber that the Content-byte needs a Content-file 

  • Yvonzim Profile Picture
    242 on at

    @ChristianAbata 

     

    Aha, dont know if i fully understand how and where to fix but i because both commands give an output that works.

    So there is a file for the "get action" and there is a file voor de "array action".

     

    Where do i have to fix this? in the email attachment field or ?

     

     

  • Yvonzim Profile Picture
    242 on at

    @ChristianAbata 

     

    This is how the peek code looks for Array variable:

     

    {
        "inputs": {
            "name""attachmentArray",
            "value": {
                "Name""@items('Apply_to_each_2')?['DisplayName']",
                "ContentBytes""@body('Get_attachment_content')"
            }
        }
    }
  • ChristianAbata Profile Picture
    8,953 Most Valuable Professional on at

    @Yvonzim  is weard I'm trying to replycate what you need but my attachment content is empy.. O.o Maeby is a temporary bug.

  • Yvonzim Profile Picture
    242 on at

    @ChristianAbata 

    Ok, maybe it is an json error, im not good in Json code;

    this is how the peekcode in the email looks like: 

     

       "Attachments": [
                    {
                        "Name""@body('Create_ICS_File_DepartureRet')?['DisplayName']",
                        "ContentBytes""@{base64(body('Get_file_content_DeparturerRet'))}"
                    },
                    {
                        "Name""@body('Create_ICS_file_ArrivalOut')?['DisplayName']",
                        "ContentBytes""@{base64(body('Get_file_content_ArrivalOut'))}"
                    },
                    "@variables('attachmentArray')"
                ],
  • Verified answer
    ChristianAbata Profile Picture
    8,953 Most Valuable Professional on at

    @Yvonzim 

     

     "Attachments": [
                    {
                        "Name""@body('Create_ICS_File_DepartureRet')?['DisplayName']",
                        "ContentBytes""@{base64(body('Get_file_content_DeparturerRet'))}"
                    },
                    {
                        "Name""@body('Create_ICS_file_ArrivalOut')?['DisplayName']",
                        "ContentBytes""@{base64(body('Get_file_content_ArrivalOut'))}"
                    },
                    {@variables('attachmentArray')} 
                ],
  • Yvonzim Profile Picture
    242 on at

    @ChristianAbata 

     

    Nope, i cant get it work.

     

    When i delete the array attachment, i get email with attachement

    whhen i add the array attachement i get an email without any attachement and no error.

     

  • Verified answer
    v-alzhan-msft Profile Picture
    Microsoft Employee on at

    Hi @Yvonzim ,

     

    I have made a test on my side and couldn't find a way to add the attachments from the Array and the attachment item.

    I'm afraid that the function is not supported in Microsoft flow currently.

    I suggest that you could add all the attachment item to the attachmentArray variable firstly, and when all the attachments is append to the attachmentArray, send the email with the attachmentArray.

     

    Best regards,

    Alice       

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard