Move emails to a different folder once read by email Listener

Hi,

Is there any process to move the emails which are read by Email listener to a completed folder(different folder) in outlook. Currently once the email is read and case is created in Pega, the emails become unread in outlook but remains in the Inbox folder.

Thanks.

Hi @ApratimG,

As per my understanding Email Listener does not provide any option to move emails after processing.

Regards,

Mohd Qizer

Yes, I understand there is no OOTB way as such to do this, but looking for some suggestions if this is feasible by any other approach or design to fulfill business requirement.

Thanks

Apratim

@ApratimG

Through email listener we cannot achieve it. By Default, Email listener will delete the read emails from Inbox which can be overridden by enabling “keep messages on the server” to avoid deleting the emails.

Please verify if we can do it from outlook on successful case creation using the flags.

Thanks, everyone for your responses, below approach could be used to implement this requirement -

1.Get the InternetMessageId of the email using the Service Email Rule

2.Use this InternetMessageId to call O365 MS Graph API from Pega - Get eventMessage method and get the Email Message Id

  1. Call the message:move operation in the MS Graph API from Pega to move the email to another folder.

https://learn.microsoft.com/en-us/graph/api/message-move?view=graph-rest-1.0&tabs=http

@ApratimGThanks for sharing it.

Adding one more detail i.e., getting messageID to be passed to graph API using internet messageID.

https://graph.microsoft.com/v1.0/me/messages?$filter=internetMessageId eq ‘’