New to Kestra?
Use blueprints to kickstart your first workflows.
Automatically ship Kestra Enterprise audit logs every week, convert them to a CSV file, and email the report to your security and compliance team.
Turn Kestra Enterprise Edition audit logs into a shareable, scheduled compliance report. This blueprint collects audit log events from the last day, exports them as a flat CSV file, and emails that file as an attachment so security, compliance, and platform teams get a recurring record of who did what inside Kestra without anyone logging into the UI. It solves the common governance problem of audit data sitting locked inside the platform: instead of manual exports, you get an automated, auditable, repeatable weekly delivery.
io.kestra.plugin.core.trigger.Schedule trigger fires on the cron 0 10 * * 5, which is every Friday at 10:00 UTC.ship_audit_logs task (io.kestra.plugin.ee.core.log.AuditLogShipper) collects audit log events using a lookbackPeriod of P1D and routes them through a FileLogExporter, writing the events to internal storage as an Ion file.convert_to_csv task (io.kestra.plugin.serdes.csv.IonToCsv) reads the first exported file URI ({{ outputs.ship_audit_logs.outputs.file.uris | first }}) and converts the Ion data into a CSV file.send_email task (io.kestra.plugin.email.MailSend) sends an email through an SMTP server (mail.privateemail.com, port 465) with the CSV attached as audit_logs.csv and a text/csv content type.Kestra ships audit logs as a first-class Enterprise feature, but shipping them is only half the job. With Kestra you wire the export, the format conversion, and the delivery into one declarative YAML flow. The Schedule trigger replaces brittle external cron jobs, retries keep the export resilient if the SMTP server or storage hiccups, and execution history gives you full lineage of every run. A standalone log exporter cannot convert Ion to CSV and email the result in the same governed pipeline: Kestra closes that gap end to end.
AuditLogShipper and FileLogExporter tasks are EE only).EMAIL_USERNAME: the SMTP username for the sending mailbox.EMAIL_PASSWORD: the SMTP password or app password.EMAIL_USERNAME and EMAIL_PASSWORD secrets to your Kestra instance.from, to, host, and port properties on send_email to match your mail provider.cron expression on the schedule trigger if you want a different cadence or timezone.lookbackPeriod to P7D for a weekly window or PT1H for hourly exports.IonToCsv for io.kestra.plugin.serdes.json.IonToJson or an Excel writer to change the output format.gcs.Upload, s3.Upload, or Slack notification to route logs elsewhere.