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?
Thanks in advance.
Solved! Go to Solution.
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:
Ellis
Kindly follow this post for email attachments,
-------------------------------------------------------------------------------------------------
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 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?
Thanks in advance.
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.
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']}"
}
}
-------------------------------------------------------------------------------------------------
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,
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"
Test Result:
Error Detail:
You can also try this format for the attachments array:
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"?
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:
Ellis
User | Count |
---|---|
26 | |
15 | |
14 | |
10 | |
10 |
User | Count |
---|---|
45 | |
29 | |
29 | |
23 | |
22 |