Send outlook email based on data from excel

Hi all,
Im new to StudioX and im still not sure about its full capabilities, i have a new project and i don’t know if its can be achieved in StudioX or not.

I have an Excel table which looks something like this, 3 records for same user. see below.

image

I need to send an email if the status of all records is approved, AND

  • Total Value for three records NOT EQUAL TO 100, OR

  • Date of any of the record = beyond 2021. OR

  • Both occur

In the above image, email has to be sent for ID1 (total value not equal to 100 and date beyond 2021), AND ID3 (total value not equal to 100).

Much appreciated.

In StudioX you should use the capabilities of Excel to process your data. A possible solution for your task would be:

  1. Transform the Status column into a 0/1 numeric value by adding a new column.
    image

  2. Create a Pivot Table in Excel with the values you need for your conditions to send the e-mail (Sum of Value, Date and Status)

  1. Make sure the Date column of pivot table is formatted as a Date:
    image

  2. Go through each row of the resulted pivot table and send-mail if the conditions are met:
    image

4.1) If the status is not 3 (all 3 records have the value Approved) skip the row and move to the next one:

4.2) Apply the sum of value and date conditions:
image

There could be other options like Iterating though all the rows and building a list in another sheet to send e-mails to , if the the conditions are met. You can use FindAndReplace activity to detect if the e-mail is already in the list and update the values associated with it.

1 Like

Thanks a lot, very useful

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.