Generate and send a PDF every 5 minutes
Recipe ToolsMarketingDeveloper Tool
What it does
When the clock triggers every 5 minutes, this automation runs JavaScript code to generate a PDF and table. Someone receives the generated file in an email without manual steps.
Who it's for
Operations teams who need to distribute generated reports on a regular schedule.
How teams use this
Distribute reports on a schedule
Generate a PDF report every 5 minutes and email it to stakeholders without manual intervention. The same recipients get the file each time the automation runs.
Send reports to different teams
Keep the same PDF generation logic but change the email recipient list so Finance gets one version and Sales gets another. Only the send step changes.
Add filters to the table data
Extend the JavaScript code to filter the table by date range or status before building the PDF. Include only records that meet the condition in the final output.
How it works
- Start on a 5-minute interval. The automation runs every 5 minutes to generate and send the PDF without someone having to start it manually.
- Execute JavaScript to build PDF. Run JavaScript code that generates the PDF content with the data needed for the report.
- Execute JavaScript to build table. Run JavaScript code that creates a formatted table to include in the PDF output.
- Execute JavaScript to finalize output. Run JavaScript code to combine the PDF and table into the final file ready to send via email.