Extract date from email, and populate in excel spreadsheet

Hi,

I wanted to know if it is possible to read a specific date from an email reply, then auto populating it in a specific column in an excel spreadsheet?

Thanks

Yes, it is possible.

You can look at email messages with the Get Mail Messages activities. There’s some for Exchange, Outlook, etc. Just use the appropriate one for whatever email you are reading from.

Once you have the message text you can pull the date out. This can be done with string manipulation or regex, it’ll depend on the exact format of your email messages.

Once you have the date you can use the Excel Scope and Write Cell/Write Range activities to write the value(s) to your excel file.

1 Like

Yes it is possible,

You can use ‘’‘Get Outlook Mail Messages’’’ to get mail message from specific folder. Get the Output from that activity, this variable was ‘mailmessage’.

You can get any attribute like date, subject by type dot(.) followed by variable.
Like: mailmessage.subject

TanQ,
Michael Udhaya

1 Like

Thanks your reply, will look into implementing it.

Also, since this is possible, could I specify a particular row for the data to be placed in.

Please see the attachment. I would like to extract a new date from an email and update/replace it in the appropriate section in the excel sheet “Expired Date” column, the row would be unknown until the email is received. So it could be for any of the two rows

SDD DB.xlsx (13.2 KB)

Thanks!

You can use Read Range inside an excel scope to get the xlsx file as a datatable. Then you can loop through and modify the datatable however you’d like. Once you’re done use Write Range with the datatable and the same file to overwrite the original contents with the newly modified contents.