Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Register for the upcoming Live Community Q&A Session - and don't forget to submit your questions for @DeanS regarding the future role of analytics here.

Sending pdf as attachment using email

8 - Asteroid

Hi everyone,


How would i go about attaching a pdf i have created with the visual layout onto an email ?


when i try currently, it pops up with an error saying 'file path cannot be specified'


Thanks :)

15 - Aurora

I sometimes use the Events tab to send an email on successful completion of a workflow. You can edit the body and subject and also add an attachment. The only limit with this method is that your attachment filename obviously needs to be static and your workflow needs to overwrite it every time (otherwise you'll attach the wrong file!).


 send email with attachment.png

8 - Asteroid

Hi David, this is not really what i'm after but useful still for some of my scheduled workflows !


I want to send an email for each record that i have - i am able to do this easily - i have used the visual layout to create a pdf that will be unique for each customer/record that i would like use as an attachment, however - it will not let me send this is it a common error ? says there is an error opening file :(

15 - Aurora

Hi @CalDowd98,


I apologise for taking a while to get back to you - I was kinda hoping someone else would jump in with a bright idea!


I'm not that familiar with the Visual Layout Tool. I had a quick look at it and from what I can see, this is my understanding:


The Visual Layout Tool generates a Layout and not actually a PDF file, so there wouldn't be anything that you can attach to the email tool.


In order to generate the PDF files, you need to use a Render tool , which you can configure to save the files to a folder using the following options:


render tool.png


You might have to play around here to get the Render Tool to generate an individual pdf file for each customer.


Once you have the files generated, you can add your email tool and configure it with the various fields to pick the the email address, Subject, attachments, etc from the fields you defined that contains that information.


Note that the Render tool does not have an output. You need to connect your email tool to a point in your workflow that contains all the data needed for the email tool such as email addresses, subject and the location of you pdf files. Look out for the File name from field value button when you click add to hook up the attachments.


Apparently, the email tool will always be the last tool to execute in a workflow.

8 - Asteroid
Hi David,

Yes I got there in the end ! I have 2 separate workflows one creating the pdf using the render tool - I can group by customer in this to get the unique file.

I then input this pdf file-path as a field into my separate workflow which sends the emails. In the middle of the filepath I add the customer field which means it will pick up the unique pdf !

Best regards,

Callum Dowd

Tel. +44 1905 752-687
15 - Aurora

Well done @CalDowd98,


It might be worth trying to drag that email tool into your first workflow, since it seems to me that you have all the info needed to send the emails already once the Render tool has done its business.


So if you connect the email tool to the same output as the Render tool, it would send the emails after the render tool is done.


Alternatively, if it works, don't fix it!