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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Save Shared mailbox at...
Power Automate
Unanswered

Save Shared mailbox attachments to SharePoint Library error apply to each contains invalid expression

(0) ShareShare
ReportReport
Posted on by 14

I am in the unenviable position of trying to get PowerAutomate to do something simple. Save attachments on new emails to a SharePoint library. Receive error "apply_to_each contains invalid expression". Can anyone point me to a clue or solution? is the Shared Mailbox V2 trigger broken?

 

 

TS79_1-1710966053506.png

TS79_2-1710966095162.png

Flow checker says no errors found.  When testing the flow:

 

TS79_0-1710967101553.png

 

Categories:
I have the same question (0)
  • Verified answer
    creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    @TS79 You can refer to this YT Tutorial: Save Email Attachments to SharePoint with Microsoft Power Automate

     

    Power Automate doesn’t have a download attachment from outlook action. In this Power Automate Video tutorial, I’ll show you how to use the Get Attachment (V2) action in combination with the Create File action to get your email attachments onto SharePoint. The Create File action will overwrite any files that already exist with the same name. In this tutorial, I’ll show you how you can append a timestamp to the end of a file name to prevent your file from being overwritten.

     

    I’ll also show you how to set up your flow so that you can trigger it manually while building it so you don’t need to wait for an email to arrive. At the end of the video I’ll show you how adding trigger conditions to your flow can prevent it from triggering if certain conditions aren’t met. Although the final flow uses the When a new email arrives in a shared mailbox (V2) trigger, you can use any of the When a new email arrives triggers for your flow. Adjust this flow to suit your needs!

     

    IN THIS VIDEO:

    ✅ How to Automate Downloading and Uploading Email Attachments to SharePoint

    ✅ How to Use a the Get Email (V2) action

    ✅ How to Use the Get Attachment (V2) action

    ✅ How to Create Attachment Files using the Create File Action

    ✅ How to Prevent the Create File Action from Overwriting a File

    ✅ How to use Split the Filename from its Extension

    ✅ How to Append a Timestamp to a File Name

    ✅ How to use the When a New Email Arrives in a Shared Mailbox (V2) trigger.

    ✅ How to use the Convert Time Zone action

    ✅ How to add Trigger Conditions to your Flow

     

    Also, if you are still running into issues with your flow please switch to the Classic Designer as the New Designer is still buggy.

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
  • TS79 Profile Picture
    14 on at

    Thank you so much.

     

    Adding the get attachment action resolved the issue.

     

    Would be great to find a resource to discover which objects are expected/output by an action and some useful error indicating an object mismatch.

     

    Working flow:

     

    TS79_0-1711031313997.png

     

  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    @TS79 You might find this YT Tutorial helpful: 5 Power Automate Troubleshooting FAQs and Helpful Tips for Creating Better Flows

     

    In this Power Automate tutorial, I explore 5 frequently asked questions that pop up when troubleshooting a flow. If you’d like to to level up your Power Automate flow skills and learn how to troubleshoot your Power Automate flow—this tutorial is for you!

     

    IN THIS VIDEO:

    ✅ How to troubleshoot a false Condition action result

    ✅ How to get dynamic content when it isn’t selectable from the list of dynamic content

    ✅ How to troubleshoot an Apply to Each action that isn’t looping through

    ✅ How to troubleshoot a skipped Apply to Each action

    ✅ How to troubleshoot a Filter Query

    ✅ How to use a SharePoint yes/no column in a Filter Query

    ✅ How to use Compose actions to troubleshoot a Power Automate flow

    ✅ How to troubleshoot multiple emails being sent

    ✅ How to troubleshoot multiple Teams messages being sent

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard