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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Retriving Attachment f...
Power Automate
Answered

Retriving Attachment from Encrypted email

(0) ShareShare
ReportReport
Posted on by 286

Hello,

 

I get an encrypted email through outlook every 2 weeks that contains a single excel document. I have tried to create a flow that monitors the inbox for emails with specific subject titles , grabs the excel attachment and saves it to a OneDrive folder. But after following a couple of guides i get error messages like

 

The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_2')' is of type 'Object'. The result must be a valid array.

 

 

Has anyone successfully been able to do this and wouldn't mind pointing me in the right direction?

Categories:
  • Rhiassuring Profile Picture
    8,692 Moderator on at

    Are you able to show us screenshots of how your flow is set-up, as well as screenshots of the details of the trigger output (go into a flow that has run, and show the outputs in the top action, in the attachments section) where an email has come through? 

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @stephenJames,

    This is the flow:

    vqiaqimsft_2-1653897934816.png

    vqiaqimsft_3-1653897991888.png

     

    vqiaqimsft_1-1653897920476.png

     

     

  • stephenJames Profile Picture
    286 on at

    @v-qiaqi-msft 

    Mine fails to work as yours shows. 

    Here is my flow 

    flow.png

     

    When it runs it outputs

    flowresult.png

     

    The file in that test was a dummy txt file. But no matter what attachment is in the encrypted email it always returns the same message_v2.rpmsg file.

     

     

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @stephenJames ,

    Here is the thing, the RPMSG file is a protected email message file created by Microsoft Outlook, Microsoft's email and calendar application.

     

    It contains an email that has been encrypted such that only certain users can view, print, copy, or forward the email. RPMSG files are sent as attachments to standard email messages, these attachments use the filename as  message.rpmsg.

     

    Power Automate does not support related actions to parse encrypted email, so I am afraid that Power Automate could only return message.rpmsg file name if you receive an encrypted email.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 335 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard