web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : rJhTo4ybGDvsJPNNd3DtB9
Power Automate - Building Flows
Unanswered

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

Like (0) ShareShare
ReportReport
Posted on 14 Dec 2022 16:00:55 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 16 Dec 2022 at 09:59:33
    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,558 on 16 Dec 2022 at 09:58:34
    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,558 on 15 Dec 2022 at 14:41:22
    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 15 Dec 2022 at 14:32:21
    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,558 on 15 Dec 2022 at 14:24:19
    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 15 Dec 2022 at 14:18:10
    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,558 on 15 Dec 2022 at 14:12:04
    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 15 Dec 2022 at 14:09:10
    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,558 on 15 Dec 2022 at 14:03:08
    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 15 Dec 2022 at 13:57:36
    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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete