cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sunghan
Helper II
Helper II

How to send Email with multiple attachments for approval?

Hello All,

I tired to make Power Automate send an email with an attachment from SharePoint when a new item is created on SharePoint. I was googling and find an instruction how to do it. I was following instruction but  I cannot see "Attachment Content" on Dynamic content list. Does someone know why I cannot see on the list? and How to fix it?

Sunghan_0-1641975302439.png

Thanks in advance.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Sorry for the lack of clarity. The screen shot I pasted was from a demo flow I made.

The ID you need to use will be from the When an item is created trigger as shown below:

Snag_16ce1706.png

 

Ellis

View solution in original post

12 REPLIES 12
hemrhk
Responsive Resident
Responsive Resident

@Sunghan 

 

Kindly follow this post for email attachments,

https://365stack.in/index.php/2021/11/19/how-to-add-dynamic-attachments-in-power-automate-send-email... 

 

------------------------------------------------------------------------------------------------- 

If it solved your problem give a kudo and accept it as a solution. 

Follow and Subscribe 365 Stack for more updates. 

 

Sunghan
Helper II
Helper II

Hi @hemrhk ,

Thank you for your feedback and I visited the link. I tired it before as same as the instruction on your link. But it didn't work.

For your reference I captured the flow. It works if there is no error if I eliminate Array. Can you coach me how to fix the error?

Sunghan_0-1641992450728.png

Sunghan_1-1641992702414.png

Sunghan_2-1641992772082.png

 

Thanks in advance.

 

hemrhk
Responsive Resident
Responsive Resident

@Sunghan 

 

Can you expand the "Apply to each" action and send a screenshot?

I hope you are using the "Get Attachment content" action inside the apply to each action. It will get the attachment data that should be passed into Content Bytes.

 

------------------------------------------------------------------------------------------------- 

If it solved your problem give a kudo and accept it as a solution. 

Follow and Subscribe 365 Stack for more updates. 

 

Hi @hemrhk ,

Pls. refer to the "Apply to each" expending below:

Sunghan_1-1641994551190.png

 

 

hemrhk
Responsive Resident
Responsive Resident

@Sunghan 

Construct the JSON in the below format in the append to array variable action.

{
"Name": "@{items('Apply_to_each')?['DisplayName']}",
"content": {
"$content-type": "@{body('Get_attachment_content')['$content-type']}",
"$content": "@{body('Get_attachment_content')['$content']}"
}
}

 

https://365stack.in/index.php/2021/11/19/how-to-add-dynamic-attachments-in-power-automate-send-email... 

------------------------------------------------------------------------------------------------- 

If it solved your problem give a kudo and accept it as a solution. 

Follow and Subscribe 365 Stack for more updates. 

 

Hi @hemrhk ,

Thank you for your explanation. I started to learn Power Automate very recently and don't know well how to edit JSON CODE. 😞

I have been searching how to edit JSON CODE. I don't think I can edit on Power Automate.

Sorry for that I do not have a capability of understanding well.

Best Regards,

 

hemrhk
Responsive Resident
Responsive Resident

@Sunghan 

 

In the append to an array variable, include this JSON code.

In Name put Display name of the attachment,

In $content-type and $content, Copy and paste the below code

{
"Name": "@{items('Apply_to_each')?['DisplayName']}",
"content": {
"$content-type": "@{body('Get_attachment_content')['$content-type']}",
"$content": "@{body('Get_attachment_content')['$content']}"
}
}

 

 

Hi @hemrhk ,

Thank you for your good explanation and Now I know that how to edit JSON Code on Power Automate.

I followed your instruction. I don't know why but It does not work properly when I run Test.

FYI: it works when I eliminate Attachments of "varAttachments"

Sunghan_3-1642119975600.png

 

Sunghan_0-1642119638709.png

Test Result:

Sunghan_1-1642119790876.png

Error Detail:

Sunghan_2-1642119862653.png

 

 

 

 

 

You can also try this format for the attachments array:

Snag_64d8315.png


Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @ekarim2020 ,

Thank you for replying for my question. Sorry I cannot see the "List Item ID" on Dynamic content. Would you please let me know to to create "List Item ID"?

Sunghan_0-1642509048254.png

Sunghan_1-1642509100672.png

Best Regards,

 

 

Sorry for the lack of clarity. The screen shot I pasted was from a demo flow I made.

The ID you need to use will be from the When an item is created trigger as shown below:

Snag_16ce1706.png

 

Ellis

Sunghan
Helper II
Helper II

Hi @ekarim2020 ,

Thank you for your clear explanation.

Best Regards,

 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (3,839)