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_KEY') }}"
    host: smtp.resend.com
    port: 465
    subject: Here is your dataset
    attachments:
      - name: data.csv
        uri: "{{ outputs.dataset1.uri }}"
        contentType: text/csv
    htmlTextContent: Please find your dataset attached as a CSV file

About this blueprint

Notifications

This flow showcases how you can send an email with a CSV file attached.

We use the Resend API as the SMTP server, and we put the API token in a Kestra Secret. Refer to the Resend API documentation for more details and API instructions.

Download

Mail Send

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra