Emailing PDF Report

I written the script, run it, generated output, sent it to a report, and saved as PDF. I cannot figure out how to automate the sending of the PDF. I’ve watched 10 videos and read about it, but am missing something.

What have you tried? What happened when you tried it?

If you aren’t sure where to start, go to Automation Designer. There is an email action under the ‘utilities’ tab. You may need to check with a network guy at your company to get the server settings right.

I have a PDF report.


I can get the Automation engine to run the script and generate the output table.
image

I have no idea what to do next.

In automation designer, go to utilities tab. Click on “email”, then click somewhere under your “GF Data Dump” action. That will create an email action. Double-click on the email action to set properties for it.

Then you can run the email action to email the file.

I don’t want to send the table, I want to send the PDF.

You can configure the email action to send the PDF file as an attachment.

If you don’t want to put the email action under the “GF Data Dump” action, that’s OK - put it somewhere else.

Thank you - that helps

I see my entire email was not sent. I still need to know how to automate the creation of the PDF.

The automation designer can’t directly run a report, but you could do it like this;

Go to Toad Options -> Email. Set “window” to “Reports Manager” and enter your email settings there. Click the “Send Test Email” button to make sure it works.

Then go into reports manager and find your report.
Click the “Generate Command Line File” button and fill out the properties in there and click OK.
It will create a file. Look at the file with notepad and it will have a command that you can run to create and email the report.

For instance, mine looks like:
"C:\Work\Installed Toads\Toad Dev Build\Toad.exe" -c "JDORLON/<4yKvSZLy5Ng4+0aa1WTZvA==>@AZURE_12CR2_PLUG" RPTMGR="C:\Employee Distribution (graph).txt"

If you create a variable to hold the PDF file name (or path and file name) you can use that same variable later to attach the document to the email. Were you able to just send a test email to yourself?

Thank you and yes, the email is working great now.