ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now

Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Email tool

shreyanshrathod
10 - Fireball

Hi,

 

I am using an Email tool to send emails upon certain conditions. I am able to achieve that.

 

However, I want to maintain a daily log of recipients that my workflow is sending mail to!!

E.g. if my workflow sends 3 emails to abc@gmail.com, xyz@gmail.com, asd@gmail.com, then I want to maintain a csv/Excel file with following structure :-

 

Date                          Email send to

01/04/2020            abc@gmail.com

01/04/2020            xyz@gmail.com

01/04/2020            asd@gmail.com

 

How do I achieve this? @patrick_digan @MarqueeCrew 

Thanks in advance.

 

Regards,

Shreyansh Rathod

BenMoss
17 - Castor
17 - Castor

The answer to this question is pretty much that it depends on the structure of your data going into the email tool, so I think we need to know that before we can truly answer your question.

 

For example, if your recipients are physically listed in the email tool, we'll have to approach solving this problem in a very different way than if they are referenced dynamically from a field.

 

In the latter scenario you would do some basic transformation to bring the data into the structure you require, as shown below and in the attached example.

 

BenMoss_0-1617263384592.png

 

The comma seperated list is a way of sending the same email to different recipients so we must then split these up using a text to columns tool, then it's a case of using a formula tool to generate todays date.

 

BenMoss_1-1617263480452.png

 

Ben

shreyanshrathod
10 - Fireball

Hi @BenMoss ,

Thank you for sharing your expertise!!

 

I have already implemented the transformation logic that you have mentioned (latter).

However, I believe it is fundamentally flawed because it will add all email id's in the email column irrespective of the fact that the mail was sent or not.

 

If my workflow (Email Tool) was not able to send email to any one/multiple recipients, it will still log those email id's into the output.

 

E.g, In the above scenario, if Email Tool could not send an email to 'abc@gmail.com' for xyz reasons (authentication, invalid ID, etc), I don't want that email id in my log.

 

So, essentially, I want to maintain a log of those emails which were successfully sent out by the Email Tool.

 

I hope I am able to explain my thought process.

 

Thank you in advance.

 

Regards,

Shreyansh Rathod

BenMoss
17 - Castor
17 - Castor

Yes that's a fair response, this was something I was thinking about; when the email doesn't send does the Email tool produce a red (i.e. fatal) error, or does it just give a soft warning in the results window? 

 

If it's the former, we should be able to build in some logic to our current workflow, if it's the latter then we may need to make use of the 'CReW macros' in order to execute the email workflow and then run a second workflow which reads the log of the first workflow, and parses out any information regarding emails not sending.

 

Ben

shreyanshrathod
10 - Fireball

Well, the Email Tool neither generates an error nor does it give a warning.

 

I tested with 4 dummy emails via Text Input.

Strangely, the result window displays that the Messages have been sent to all 4 emails.

 

However, since the sending email id is mine, I got 4 mails in my inbox stating that the email address could not be found!!

 

Also, even if everything was going alright, the log file does not capture the email id's, it simply states : 'Tool id () : Messages sent - 4'.

 

Attaching the screenshots for your reference

shreyanshrathod_0-1617279459741.png

a) Dummy emails for testing

 

shreyanshrathod_1-1617279510749.png

b) Result window despite fake dummy emails

 

shreyanshrathod_2-1617279556602.png

c) log file capture

 

Regards,
Shreyansh Rathod

 

BenMoss
17 - Castor
17 - Castor

I guess in this case the emails are sent, so I would agree with Alteryx on this front, the messages were sent you just got a bounce back. Unless you create a way of monitoring your inbox (which is possible with Alteryx, check out some macros on the Alteryx Gallery), then I'm not sure what you can do, nor expect Alteryx to do in this case.

 

Sometimes the tool will fail to send emails within Alteryx, say for example, you have no internet connection, or something like that, you'll be able to catch these cases with the logic shared above, in this scenario I guess either all the emails are sent (unless the internet connection drops mid-way through sending them), or no emails are sent, in which case you can just remove all records from your workflow.

 

You can break your piece into two workflows...

 

1. Send emails and generate table of 'emails I think I have sent'

 

2. workflow that gets information from logs to find out if the tool did send all/no emails, pull records out if so, also monitors inbox to check if you have any bounce backs, if so pulls those specific records out of the input generated in step 1.

 

Ben

shreyanshrathod
10 - Fireball

Hi @BenMoss ,

 

Thank you for the direction. Good suggestion on the internet connectivity failure. 

For the logging, I am still looking out for it!!

 

If it's convenient, can you share the link for the macros that you mentioned on monitoring the Inbox.

That would be helpful.

 

Thanks,

Shreyansh Rathod

Labels