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

Community site session details

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

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,951 Most Valuable Professional on at
    Re: email 2 types of attachments

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

  • Yvonzim Profile Picture
    242 on at
    Re: email 2 types of attachments

    @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,951 Most Valuable Professional on at
    Re: email 2 types of attachments

    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
    Re: email 2 types of attachments

    @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
    Re: email 2 types of attachments

    @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,951 Most Valuable Professional on at
    Re: email 2 types of attachments

    @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
    Re: email 2 types of attachments

    @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,951 Most Valuable Professional on at
    Re: email 2 types of attachments

    @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
    Re: email 2 types of attachments

    @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
    on at
    Re: email 2 types of attachments

    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard