Hi,
Looking to create a workflow that points to a single folder and sends out separate emails to a specified contact for every pdf file that's dropped into the folder.
Essentially I want to drop pdfs in a shared folder and then run my workflow to send multiple email with each attached pdf.
hi @jsilavong
You can easily do this within Alteryx. I'd suggest starting with a directory tool, to get a list of all the PDF files within your folder.
You can send an email for each one, and attach the corresponding pdf, by using the email tool. In here you will see that each field can be manually typed, or dynamic and selected from a field. This includes attachments:
This should get you started, give me a shout if you run into any problems!
Cheers,
TheOC
I want to publish tool to the server for other users to run. Is there a way to point the workflow to a folder and it to run with any files that are dropped into the folder.
I think if i follow my normal workflow it makes me edit the email too to select the PDFs in the file. I just want the tool to pick up any PDFs that are sitting in the folder and shoot them off to a specified email as an attachment.
hi @jsilavong
yes ofcourse! If you use the directory tool:
You can specify a directory to pick up the PDF file locations from. You can also specify to only pick up PDF files using the file specification. You then have the data (as show in the results window). In my case i have 5 results, 5 pdf files in that location. I can then build logic around these (for example, based on the name of them, who they need sending to), and then plug them into an email tool:
If i take the attachment file name from field value (using fullpath), this will attach that PDF file to my email.
This is dynamic, as the directory tool will pick up any new PDF files in that folder, every time it is run.
On the server, i would recommend a shared drive, and ensuring that the server also has access to that shared drive.
Hope this helps,
TheOC
Hi @jsilavong
Alteryx is designed a data prep and analysis tool. The functionality of the input and output tools is built around getting data into the workflow and sending out the results. As such, there's no built in way to set up a listener that will trigger an action when a file is added to a directory. Indeed, the functionality of the input and output tools is so focused on getting data and sending results, that there isn't even a way to move a file without invoking a DOS command or a python/R script
While you can't set a file listener, you can work around this by scheduling the workflow to run every so often. The run frequency will be determined by the needs of your users.
The tricky part here is storing the timestamp in a location that will be accessible to the next run. Workflows are not stored directly on disk on an Alteryx server. They're stored in a database, extracted to a staging directory when run and then contents of the staging directory is erased. So the timestamp needs to be stored somewhere external. This can be on a shared drive, an external db, etc.
Dan
Is it possible to do this, attaching the pdf from Google Drive?