cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
beniwal
Helper III
Helper III

office365.move method

Hi,

 

I want to move an email to a different folder through powerapps.

 

Please guide how to use the office365.move function !

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @beniwal ,

Do you want to remove a Outlook email from default Inbox folder into another different folder?

 

Before you remove a Outlook email from default Inbox folder into another different folder, you need to find the specific email from your Outlook Inbox firstly.

 

I have made a test on my side, please take a try with the following workaround:5.JPG

 

6.JPG

 

7.JPG

Set the OnStart property of the App control to following:

ClearCollect(EmailCollections, Office365.GetEmails({folderPath: "Inbox", top:25}))

Note: Currently, there is an known limit with Office365.GetEmails() function or Office365.GetEmailsV2() function -- we could only retrieve 25 emails at most once time.

Add a Gallery control in your app, set the Items property to following:

EmailCollections

within the Gallery, add a "Move" icon, set the OnSelect property to following:

Office365.MoveV2(ThisItem.Id, "Junk Email");  /* <-- "Junk Email" represents the Outlook folder you want to move email to */
ClearCollect(EmailCollections, Office365.GetEmails({folderPath: "Inbox", top:25}))

If you want to move an email to an Subfolder of an specific Outlook, please modify above formula as below:

Office365.MoveV2(ThisItem.Id, "Root Folder/Sub Folder");
ClearCollect(EmailCollections, Office365.GetEmails({folderPath: "Inbox", top:25}))

Please check the following GIF screenshot for more details:Test.gif

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
yashag2255
Dual Super User II
Dual Super User II

Hi @beniwal 

 

You can use the below command for achieving this:
 
Office365.MoveV2(ThisItem.Id,"Sent Items")
 
Here, as first argument of the function, you need to pass the unique message id to identify the email. Since, I have used a gallery control to display a number of emails, so I have used ThisItem.Id to get the ID for specific email. Second argument need to be the folder name you want to move in the mails to.
III1.png

 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

v-xida-msft
Community Support
Community Support

Hi @beniwal ,

Do you want to remove a Outlook email from default Inbox folder into another different folder?

 

Before you remove a Outlook email from default Inbox folder into another different folder, you need to find the specific email from your Outlook Inbox firstly.

 

I have made a test on my side, please take a try with the following workaround:5.JPG

 

6.JPG

 

7.JPG

Set the OnStart property of the App control to following:

ClearCollect(EmailCollections, Office365.GetEmails({folderPath: "Inbox", top:25}))

Note: Currently, there is an known limit with Office365.GetEmails() function or Office365.GetEmailsV2() function -- we could only retrieve 25 emails at most once time.

Add a Gallery control in your app, set the Items property to following:

EmailCollections

within the Gallery, add a "Move" icon, set the OnSelect property to following:

Office365.MoveV2(ThisItem.Id, "Junk Email");  /* <-- "Junk Email" represents the Outlook folder you want to move email to */
ClearCollect(EmailCollections, Office365.GetEmails({folderPath: "Inbox", top:25}))

If you want to move an email to an Subfolder of an specific Outlook, please modify above formula as below:

Office365.MoveV2(ThisItem.Id, "Root Folder/Sub Folder");
ClearCollect(EmailCollections, Office365.GetEmails({folderPath: "Inbox", top:25}))

Please check the following GIF screenshot for more details:Test.gif

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (91,335)