Skip to content

Latest commit

 

History

History

report-toaster-deliver-report-pdf-via-email-or-slack

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Report Toaster: Deliver report PDF via email or Slack

Tags: Email, PDF, Report, Report Toaster, Slack

This task demonstrates how a report can be requested from Report Toaster as a PDF. Once delivered, it is emailed to one or more recipients and/or sent to a Slack channel.

Default options

{
  "report_id__required": null,
  "email_report_recipients__array": null,
  "slack_incoming_webhook_url": null,
  "message_body__multiline_required": "Hello,\n\nYour report is now available for download:\n\nReport Name: {{ event.data.name }}\nDownload Link: {{ event.data.file.url }}\n\nEnjoy!",
  "run_this_task_daily__boolean": null
}

Learn about task options in Mechanic

Subscriptions

{% if options.run_this_task_daily__boolean %}
  mechanic/scheduler/daily
{% endif %}
mechanic/user/trigger
report_toaster/reports/create

Learn about event subscriptions in Mechanic

Documentation

This task demonstrates how a report can be requested from Report Toaster as a PDF. Once delivered, it is emailed to one or more recipients and/or sent to a Slack channel.

You can use this task with any pre-built or custom report from Report Toaster by simply changing the report ID. Learn how to find your report ID here.

The report can be requested via CSV or PDF by changing the file format property. If the file format is omitted, the report results are returned as JSON directly within the task result.

See Mechanic's documentation on Report Toaster for more information.

The task can be run manually, or optionally, set to run as a daily report by checking the "Run this task daily" option. If a less frequent schedule is desired, then you may substitute the "mechanic/scheduler/daily" subscription with a different scheduler topic. See the Mechanic scheduler event topics for more details.

Installing this task

Find this task in the library at tasks.mechanic.dev, and use the "Try this task" button. Or, import this task's JSON export – see Importing and exporting tasks to learn how imports work.

Contributions

Found a bug? Got an improvement to add? Start here: ../../CONTRIBUTING.md.

Task requests

Submit your task requests for consideration by the Mechanic community, and they may be chosen for development and inclusion in the task library!