cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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
Highlighted
Dual Super User III
Dual Super User III

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!

Highlighted
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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,775)