Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Forwarding email from shared mailbox with send an email account creating separate emails for each attachment

(0) ShareShare
ReportReport
Posted on by 1,597 Super User 2024 Season 1

Hello,


When emails are essentially being forwarded (via Send an email from a Shared Mailbox action) if the original emails include two attachments, then two separate emails are sent with an attachment in each.

 

We need to figure out a way to include all attachments in one email - can you help? 😀

 

In this workflow I have a 'When a new email arrives in a shared mailbox (V2)' trigger that monitor a folder within a mailbox with the option of 'Include Attachments' set to Yes.

sudosaurus_0-1671032475687.png

Next we have an 'Apply to each' loop with the output using the 'Attachments' value from the trigger item. 

sudosaurus_1-1671032649226.png


The first of these is sending an email from a shared mailbox to another email account prefixing LWF- to before the subject value from the trigger item.  It is also adding the 'Attachments Name' and 'Attachments Content'.

sudosaurus_7-1671033054075.png

 

Once the above action has sent the email, the intial email from the trigger is marked as 'Read'.

sudosaurus_5-1671032816995.png

Finally, the inital email is moved to the 'ACTIONED' folder.

sudosaurus_6-1671032842297.png

 

Whilst the main elements of the workflow are working, if there is an initial email with two attachments, these are being sent in two separate emails with one attachment in each - this is the priority issue to fix.

 

Additionally if the intiial email has images in a signature from the external company that sent it to us, then these are also collected as attachments - even though the 'Body' value is not being included in the 'Send an email from Finance Payments to Kofax' action, these signature images are still being collected as attachments and therefore if there are 4 images in a signature these are being attached to 4 new emails and sent to the desintation mailbox - ideally it would be good to not include these however if there's no workaround then I guess there's not much that can be done!

 

 

 

 

  • sudosaurus Profile Picture
    1,597 Super User 2024 Season 1 on at
    Re: Forwarding email from shared mailbox with send an email account creating separate emails for each attachment

    @VictorIvanidze nothing yet

     

    working out a different way to do this.

  • VictorIvanidze Profile Picture
    12,480 on at
    Re: Forwarding email from shared mailbox with send an email account creating separate emails for each attachment

    Hi @sudosaurus,

    how's going on? 

  • VictorIvanidze Profile Picture
    12,480 on at
    Re: Forwarding email from shared mailbox with send an email account creating separate emails for each attachment

    You cannot do that using standard GRAPH forward request.

    You can use my template that allows you to do that but it costs...

  • sudosaurus Profile Picture
    1,597 Super User 2024 Season 1 on at
    Re: Forwarding email from shared mailbox with send an email account creating separate emails for each attachment

    @VictorIvanidze OK, got it working.

    How can I append some text to the subject line of the forwarded email? I saw you can do this with MIME forwarding however it doesnt appear to explain how to configure that in the same way as when using JSON.

  • VictorIvanidze Profile Picture
    12,480 on at
    Re: Forwarding email from shared mailbox with send an email account creating separate emails for each attachment

     

    Just read https://learn.microsoft.com/en-us/graph/api/message-forward?view=graph-rest-1.0&tabs=http

  • sudosaurus Profile Picture
    1,597 Super User 2024 Season 1 on at
    Re: Forwarding email from shared mailbox with send an email account creating separate emails for each attachment

    @VictorIvanidze 

     

    I am confused..

    Both the name and address words have double quotes around them.

     

    Do I also need to put double quotes round the actual name and email address then?

     

    eg: "name": "Chris Cundy", "address": "chris.cundy@livewest.co.uk"

    sudosaurus_0-1671113741895.png

    If not, could you put in an example for me as I'm just not grasping this!

     

  • VictorIvanidze Profile Picture
    12,480 on at
    Re: Forwarding email from shared mailbox with send an email account creating separate emails for each attachment

    No, you have missed double quotes in the Body (before and after both name and address).

  • sudosaurus Profile Picture
    1,597 Super User 2024 Season 1 on at
    Re: Forwarding email from shared mailbox with send an email account creating separate emails for each attachment

    @VictorIvanidze - it seems to accept the information in Graph Explorer however when running the workflow I receive this error: Action 'Send_an_HTTP_request' failed.

     

    {
     "error": {
     "code": "BadRequest",
     "message": "Unable to read JSON request payload. Please ensure Content-Type header is set and payload is of valid JSON format.",
     "innerError": {
     "date": "2022-12-15T14:02:51",
     "request-id": "53b59000-2fd9-4ab0-8d76-ae3bc1b2590e",
     "client-request-id": "53b59000-2fd9-4ab0-8d76-ae3bc1b2590e"
     }
     }
    }

     

    Is it because I'm placing 'Message Id' where {id} was placed?

     

    sudosaurus_1-1671113280536.png

     

     

  • VictorIvanidze Profile Picture
    12,480 on at
    Re: Forwarding email from shared mailbox with send an email account creating separate emails for each attachment

    Looks correct - just try to do it in the GRAPH explorer to be sure.

  • sudosaurus Profile Picture
    1,597 Super User 2024 Season 1 on at
    Re: Forwarding email from shared mailbox with send an email account creating separate emails for each attachment

    @VictorIvanidze 

     

    So, like this? - and this should forward the attachments right?

     

    POST https://graph.microsoft.com/v1.0/me/messages/{id}/forward
    Content-type: application/json
    
    {
     "comment": "comment-value",
     "toRecipients": [
     {
     "emailAddress": {
     "name": kofax,
     "address": kofax@domain.com
     }
     }
     ]
    }

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492