Solved! Go to Solution.
Actually, I was using this MS Ignite video Deep dive: Advanced workflow automation with Microsoft Flow and it instructed (at the 55:35 minute) that the ContentBytes content should be wrapped/defined in base64(), i.e base64(body('Get_attachment_content')). This worked as expected with Flow "When item is created" but failed when using Flow "When item is modified" . I ended getting it to work using these instructions https://flow.microsoft.com/en-us/blog/multiple-attachments-single-email/, and specifically with one of the comments stating that ContentBytes should be defined this way: body('Get_attachment_content').$content
Hi @Anonymous,
First of all, the trigger-When existing list item is modified is actually “When an item is created or modified”.
Then the format of the data in Compose action doesn't seem right, Dynamic content doesn't need to be surrounded by quotes here.
If you want to get attachments from the list item and send it as attachments in the email, please refer to this blog:
https://flow.microsoft.com/en-us/blog/multiple-attachments-single-email/
Or refer to a similar Thread to see if it helps:
Best Regards,
Barry
Actually, I was using this MS Ignite video Deep dive: Advanced workflow automation with Microsoft Flow and it instructed (at the 55:35 minute) that the ContentBytes content should be wrapped/defined in base64(), i.e base64(body('Get_attachment_content')). This worked as expected with Flow "When item is created" but failed when using Flow "When item is modified" . I ended getting it to work using these instructions https://flow.microsoft.com/en-us/blog/multiple-attachments-single-email/, and specifically with one of the comments stating that ContentBytes should be defined this way: body('Get_attachment_content').$content
You said it worked once, then failed?
Because if you base64() something, then edit the Flow (in any way) and save it, you will lose the base64() part of your expression.
In between the successful run and the run that failed, did you open your Flow and then save it? Because that'll be why.
Come to think of it, that's I bug I should report in a separate post.
Wrapping in base64() worked for "When item is created" but failed for "When item is modified" (https://us.flow.microsoft.com/en-us/galleries/public/templates/3821506240744debadcd89c94690652d/when...)
Yeah, I know that's what your saying.
But, I'm pointing out there's this bug you probably didn't know about. You may have percieved that to be what happened, but are you sure your base64() expression was still in place during the "when an item is modified" run?
Because in your screenshot - it's not.
base64() went away in both when I would put the flow back in edit mode after saving the first time. But only "When item is modified" would fail.
Items generally get created before they get modified. If you first created, and then modified some items, and lost the base64() expression somewhere in between, I can see how you would conclude that the error only occurs when an item is modified.
The base64() expression got lost in both flows after saving them. Not sure why one template would work and not the other. In any case, it ended up working for both templates with body('Get_attachment_content').$content with no error telling me that Attachment Name is missing.
Hi @Anonymous,
Yes, the main cause of the error in the similar Thread I provided is this, which has been solved.
Regards,
Barry
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.
User | Count |
---|---|
3 | |
2 | |
2 | |
2 | |
2 |