cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Forward Flagged Email with Attachments

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

Highlighted
Anonymous
Not applicable

Re: Forward Flagged Email with Attachments

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
Highlighted
Community Support
Community Support

Re: Forward Flagged Email with Attachments

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

Highlighted
Anonymous
Not applicable

Re: Forward Flagged Email with Attachments

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
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (6,528)