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 Apps / Powerapp to save email...
Power Apps
Unanswered

Powerapp to save emails and their attachments to sharepoint

(0) ShareShare
ReportReport
Posted on by 17

Hi

 

I'm trying to build a powerapp which would allow the user to drag and drop an email into an attachment field, click a button in the app which would run a flow which would save the email to sharepoint. 

 

I've separately been able to design a flow which will save an email placed into a folder in outlook to a specified folder on sharepoint. However, when I've shared this flow with people they've found it tricky to use, as they need to go into the flow to change the destination location for sharepoint etc. So the idea of the powerapp is to switch the email saving from a background operation which runs when emails are copied to a folder in outlook to one the user has to take a greater part in, but doesn't then involve the user making changes in flow. 

 

I've been using https://www.youtube.com/watch?v=yC0W5am6M3Q to create the powerapp and I'm able to drop an email into the powerapp and have it save in sharepoint. However, I want to use some of the properties of the email (the subject, date received, sender) to rename the email and to extract and rename any attachments. 

 

In my existing flow I'm able to do this as I use the "export email (V2)" function. This gives me access to the subject, date received etc as dynamic content. However, I can't work out how to access this information when I'm importing the file from a powerapp. 

 

I've tried copying the function which you see if you hover your mouse over the dynamic content in the flow which works ("triggerOutputs()?['body/subject'] say) but this hasn't worked. I've also tried a variation of this triggerBody()['file']['subject'], but that doesn't work either. 

 

I feel as though I'm missing something really obvious, but is there a way to get hold of the email information and attachments if you import an email into a flow using a powerapp? 

 

Thanks! 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Paul,

    I would recommend instead of directly saving to sharepoint, save to a collection and then have this collection go into an edit form where you can then edit the fields you want before patching it to SharePoint

    Hope it helps,

    Jamie 

  • london_paul Profile Picture
    17 on at

    Hi Jamie

     

    Thanks for a really quick response. I'm new to powerapps so this may be really obvious but: 

     

    I've created a collection ("ClearCollect(Collection_attachments,FileAttachments.Attachments)"). This will put the email attachments into a collection with the default columns of "Name" and "Value". Can I define columns and automatically put the sent date, subject etc in them?

     

    Alternatively, is your suggestion that when the collection goes into an edit form that the user would add this data?

     

     Thanks!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    There are two methods you could try,

    What i suggested so have an edit form linked to the sharepoint form but dynamically set the update options to the corresponding field in your collection. Or use power automate flow to add to sharepoint. If there are additional fields on the sharepoint list then this can be added via the form.

    Jamie

  • london_paul Profile Picture
    17 on at

    Thanks Jamie

     

    I'm struggling a little to understand what you're suggesting. My biggest issue is that I don't know how to get the information from the email I'm adding to the powerapp to dynamically set the update options. 

     

    So if I drag an email to the attachment field, how can I extract the subject, sender etc from that email file to then add to the collection or otherwise use that information?

     

    Apologies if what you've suggested does this, I'm just a bit too new to this to follow it. 

     

    Thanks, 

     

    Paul

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard