Hi,
I have setup a workflow for sending automated reports that is as follows:
A “Generator” workflow that gets a specific dashboard and send a request to “https://api.losant.com/dashboards/{{APP_ID}}”
with the following body:
{
"callbackUrl":"{{MY_CALLBACK}}",
"subject": "Dashboard Report",
"message": "Monthly Report",
"time": {{data.now}},
"theme": "light",
"timezone": "America/Chicago",
"locale": "en-us",
"branded": false,
"ctx": {
"experienceUser" : "{{data.experienceUser.id}}",
"deviceId": "{{data.device.deviceId}}"
}
}
This sends a request to generate a report and then it sends the result to “MY_CALLBACK” url. This URL is a losant webhook which triggers another workflow. In this workflow I send an email using “{{data.body.downloadUrl}}” as my url for the report.
Everything works great, except for one issue: The report url it generates is of the format “http://url803.mydomain.com/ls/click?upn={{random string}}” which is an insecure URL, which causes the browser to warn you when you try to download it from the email.
Am I doing something wrong, or should I be doing this on a different way? I need to follow this workflow to be able to use SendGrid, and I can’t seem to be able to find an option on the schema to get an https download URL.
This is the reference schema for the send report API:
Dashboard Send Report Schema | Losant Documentation