Is there a away to create a PDF report and keep it on Tago platform (or an external cloud location) so user can access it directly instead of emailing the report?
Additionally, what does the file name parameter do on the send email options? Should we use a random name here?
Here is an example, showing how to send email with an attachment:
const services = new Services({ token: context.token }); // analysis token
await services.email
.send({
to: email,
subject: “your subject”,
message: “your message”,
attachment: {
filename: “report.csv”, // you can insert any name e.g: file.pdf | example.doc
archive: csv, // csv need to be a base64 data
},
})
.then(context.log)
.catch(context.log);