send emails according to criteria

Hello everyone :slight_smile: ,

I have a list with email address, order number and customer number, I would like to send an email to each customer with his order number, I do not know how to do it.
I would greatly appreciate if someone could help me build the workflow.

test_mail_eric.xlsx (10.2 KB)

Hi @Barba

Basically your wf can look like this:

The Table Row To Variable Loop Start processes every record of your input file. This makes it possible to completely personalyse your email, by using flow variables (created by the Loop Start).

Don’t forget to configure the Mail Host (SMTP) tab.

gr. Hans


Hi HansS,

Thank you very much for your answer. Unfortunately, it’s more complicated and it’s my fault because I didn’t share the final excel file. A command can have several lines, for example:

customer 1 order A line 1 qty 10
customer 1 order A line 2 qty 20
customer 1 order A line 3 qty 30

customer 1 order B line 1 quantity 5
customer 1 order B line 2 qty 10

customer 2 order A line 1 qty 10
customer 2 order A line 2 qty 20
customer 2 order A line 3 qty 30

customer 2 order B line 1 qty 5
customer 2 order B line 2 qty 10

What I need is to group by customer/order and the message would be like this:

Dear Customer 1, here is the summary of your order A:

Line 1 qty 10
Line 2 qty 20
Line 3 qty 30

etc etc…

1 Like

Hi @Barba

It is a little bit difficult without knowing your a data and how you want to use your data in the email . But I’m sure the Table to HTML String nodes can help you out.

If you don’t know how to move forward, then upload some sample data (= a file) with data from +/- 3 customers. With some description of the layout of the email.

gr. Hans

Hi @HansS ,

Many thanks for your time and help, really appreciated.
I tried yesterday the “Table to HTML String nodes”, that’s exactly what I’m looking for for the content of the mail. The problem is that if a command contains several lines, it sends as many mails as lines present in the order, I tried groupby, etc, but without success. in PJ the file that serves as my work base.

Thnaks in adance,
test_mail_eric.xlsx (10.9 KB)

1 Like

Hi @Barba

A dataset helps :slight_smile: In this case you can go for the a Group Loop. The Group Loop Start nodes defines the groups you want to send an email. In this case I choose adress, client and order that makes every email unique.

Hopes this helps.

gr. Hans


Thank you so much @HansS , it’s perfect !!!

1 Like

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