Blueprints

Send an email and corresponding attachments with Resend

Source

yaml
id: send-email-with-attachment
namespace: company.team

tasks:
  - id: dataset1
    type: io.kestra.plugin.core.http.Download
    uri: https://huggingface.co/datasets/kestra/datasets/raw/main/csv/products.csv

  - id: send_email
    type: io.kestra.plugin.notifications.mail.MailSend
    from: [email protected]
    to: [email protected]
    username: resend
    password: "{{ secret('RESEND_API') }}"
    host: smtp.resend.com
    port: 465
    subject: Here is your dataset
    attachments:
      - name: data.csv
        uri: "{{ outputs.dataset1.uri }}"
    htmlTextContent: Please find attached your dataset as a CSV filie

About this blueprint

Notifications

This flow showcase how you can send an email with a CSV file attached. We use Resend API as the SMTP server and we but the API token in a Kestra Secret. You can find more instruction about Resend API here

Download

Mail Send

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra