cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Forward Flagged Email with Attachments

I am trying to forward a flagged email to me@onenote.com but keep running into errors.

 

Scenario 1: When email is flagged -> forward email

 

This works, but then the forwarded message is also "flagged" and gets forwarded again, and again into an infinite loop.

 

Scenario 2: When email is flagged -> send email

 

This works if I do not want the attachment, however when I add the attachments from the flagged email I get the following error:

 

Parameter 'Attachment Content' cannot be null or empty

 

I'll take a fix for either scenario, just want to get this to work.

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Anonymous,

 

For your first scenario, the issue is confirmed on my side, the flow would be in a infinite loop.

 

For your second scenario, could you please share a bit more about your error message? Do you want to forward an email for each attachment within the flagged email or forward a single email which includes all attachments within the flagged email?

 

I have made a test on my side and don't have the issue that you mentioned. My flow's configuration as below:

  • If you want to forward an email for each attachment within the flagged email:14.JPG

    The flow works successfully as below:15.JPGNote: Please make sure that the Has Attachment field and Include Attachments field are both set to Yes.

 

  • If you want to forward a single email which includes all attachments within the flagged email:
  1. Add a "When an email is flagged" trigger, Has Attachment field and Include Attachments field set to Yes.
  2. Add a Variables-> "Initialize variable" action, Name set to AttachmentArray, Type set to Array and Value set to empty.
  3. Add a "Apply to each" action, input parameter set to output of Attachments dynamic content of the trigger.
  4. Within "Apply to each", add a "Append to array variable" action, Name choose AttachmentArray, Value set to following json data:16.JPG

    Note: There are two elements within the json data, the key of first element set to Name and corresponding value set to Name dynamic content of the trigger. The key of second element set to ContentBytes and corresponding value set to Content dynamic content of the trigger.

  5. Under "Apply to each" action, add a "Send an email" action, Attachments field set to AttachmentArray variable.

Image reference:17.JPG

 

18.JPG

The flow works successfully as below:19.JPG

 

 

 

Please check if the Has Attachment field and Include Attachments field of the "When an email is flagged" trigger are both set to Yes on your side.

 

 

Best regards,

Kris

 

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

View solution in original post

Anonymous
Not applicable

The "Include Attachments" worked! The has attachment I think would just filter messages that only had attachments, so I don't need that flag on. I just needed to tell the flow to include the attachments in the step.

 

Thanks!

View solution in original post

2 REPLIES 2
v-xida-msft
Community Support
Community Support

Hi @Anonymous,

 

For your first scenario, the issue is confirmed on my side, the flow would be in a infinite loop.

 

For your second scenario, could you please share a bit more about your error message? Do you want to forward an email for each attachment within the flagged email or forward a single email which includes all attachments within the flagged email?

 

I have made a test on my side and don't have the issue that you mentioned. My flow's configuration as below:

  • If you want to forward an email for each attachment within the flagged email:14.JPG

    The flow works successfully as below:15.JPGNote: Please make sure that the Has Attachment field and Include Attachments field are both set to Yes.

 

  • If you want to forward a single email which includes all attachments within the flagged email:
  1. Add a "When an email is flagged" trigger, Has Attachment field and Include Attachments field set to Yes.
  2. Add a Variables-> "Initialize variable" action, Name set to AttachmentArray, Type set to Array and Value set to empty.
  3. Add a "Apply to each" action, input parameter set to output of Attachments dynamic content of the trigger.
  4. Within "Apply to each", add a "Append to array variable" action, Name choose AttachmentArray, Value set to following json data:16.JPG

    Note: There are two elements within the json data, the key of first element set to Name and corresponding value set to Name dynamic content of the trigger. The key of second element set to ContentBytes and corresponding value set to Content dynamic content of the trigger.

  5. Under "Apply to each" action, add a "Send an email" action, Attachments field set to AttachmentArray variable.

Image reference:17.JPG

 

18.JPG

The flow works successfully as below:19.JPG

 

 

 

Please check if the Has Attachment field and Include Attachments field of the "When an email is flagged" trigger are both set to Yes on your side.

 

 

Best regards,

Kris

 

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

View solution in original post

Anonymous
Not applicable

The "Include Attachments" worked! The has attachment I think would just filter messages that only had attachments, so I don't need that flag on. I just needed to tell the flow to include the attachments in the step.

 

Thanks!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,538)