cancel
Showing results for 
Search instead for 
Did you mean: 

Delete Outlook Email

GowthamBopaiah
Level 5

 Hii all my requirment is .Create a reusable process to cleanup mails in an outlook folder.Process should get the startup param such as folder name and datetim

for example - if we need to delete emails in Sent items which are 90 days older  , i tried using delete outlook email action under outllok vbo but it is asking entry id as input , but there is no action under outllok vbo which provide entry id as output . can u provide any suggestions or help with this please 



------------------------------
Gowtham Bopaiah
------------------------------
1 BEST ANSWER

Helpful Answers

Hi

If you are using the standard Outlook VBO then the Get received Items(Basic) is used for getting emails from the mailbox. The output wont specifically have a data item for entry id's it will be a collection for Items which will contain all the information relating to all the emails gathering using the search criteria. Within the collection the entry ID is produced for each email in the collection. I've provided some screenshots below.

30892.png

30893.png

30894.png



------------------------------
Michael ONeil
Technical Lead developer
NTTData
Europe/London
------------------------------

View answer in original post

12 REPLIES 12

Hi @Gowtham Bopaiah 

Unfortunately there is no action to delete all emails within a specific time frame. You could likely build a custom code stage to do this if you really required it but with the standard actions for outlook you would need to use Get Emails to get all the emails within the date ranges you provide and from the collection list of emails produced you can loop this and use Delete Email action. The get emails action will provide you the email entryID require to delete each one individually.



------------------------------
Michael ONeil
Technical Lead developer
NTTData
Europe/London
------------------------------

thanks for the reply Michael , if i just want to delete mail its asking entry id , how to get the entry id as there is no ms outook action which provides entry id as output 



------------------------------
Gowtham Bopaiah
------------------------------

Unfortunately the only way to get the entry ID is to use the get emails action. This will provide all the details for each email matching the search criteria including the entry id for each. There isnt another action that will provide the entry id for the mail items apart from this, when you use this it will output everything to a collection and the collection will contain the entry ID as field.



------------------------------
Michael ONeil
Technical Lead developer
NTTData
Europe/London
------------------------------

my outllok vbo doesnt have this get email action , it has get sent items and recieved items but , those action output does'nt have entry id 



------------------------------
Gowtham Bopaiah
------------------------------

Hi

If you are using the standard Outlook VBO then the Get received Items(Basic) is used for getting emails from the mailbox. The output wont specifically have a data item for entry id's it will be a collection for Items which will contain all the information relating to all the emails gathering using the search criteria. Within the collection the entry ID is produced for each email in the collection. I've provided some screenshots below.

30892.png

30893.png

30894.png



------------------------------
Michael ONeil
Technical Lead developer
NTTData
Europe/London
------------------------------

thanks a lot Michael



------------------------------
Gowtham Bopaiah
------------------------------

30900.png

Any suggestion  how the file path should be given i have mail in sent items and in current mailbox folder



------------------------------
Gowtham Bopaiah
------------------------------

"\Name@organization.com\Sent Items\Current Mails" iam passing this but iam getting error saying invalid path ,if i remove "" then bp throughs error as expected input is text



------------------------------
Gowtham Bopaiah
------------------------------

You need two backslashes at the beginning. Example: \\Name@organization.com\Sent Items\Current Mails.

Cheers,



------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------