Custom Reports by Email

I realize there are built-in dashboard reports for emailing but they are pretty limited. Many of our users want a custom report with some key insights based on their application - more than just a data snapshot. For example some type of reports used for auditing, or compliance, etc. Are there any tools or third party integrations any of you can suggest to make creating custom email reports quicker and easier?

I am going through the same process at the moment.

I can;t work out how to create attachments using the mail / sendgrid node.

So I am grabbing the report output (csv in my case) from a workflow via web hook then mailing it from our internal systems. ( It would be easy to do this from cloudfunctions, or appengine with a cron as well)

1 Like

Would you mind posting a screen shot example of how you are doing that?

Hi Paul

In is simplest form I use a basic script (uses ubuntu heirloom-mailx package) for the mailx command

And it use a webhook to call a workflow. This script is run via cron.

#!/bin/bash

DAY=`date +%Y-%m-%d`
CUSTOMER="XXXXXX"
RECIPIENT="xxx@xxxxx"
CC="xxxx@xxxxxxx"

MSG=$(cat <<EOF

Please find attached the duty report for the date ${DAY} for ${SITE}

Do not reply to this email, please contact your account manager if you have any queries.


EOF
)

FILE="${DAY}_xxxx_data.csv"

wget -O ${FILE} https://triggers.losant.com/webhooks/[SOMETRIGGER]


echo "${MSG}" | mailx -v -s "Duty report for ${CUSTOMER}" -S smtp-use-starttls -S ssl-verify=ignore -S smtp-auth=login -S smtp=[mailserver] -S from=[SERVICE ACCCOUNT] -S smtp-auth-user=[SERVICE AUTH USER] -S smtp-auth-password=[PASSWORD] -a ${FILE} -c ${CC} ${RECIPIENT}
1 Like