Send an email via Microsoft Graph API

Send an email message through Outlook using Microsoft Graph API. Supports HTML and plain text content, multiple recipients, attachments, and various email options.

yaml
type: "io.kestra.plugin.microsoft365.outlook.Send"

Send a simple email

yaml
id: send_outlook_email
namespace: company.team

tasks:
  - id: send_email
    type: io.kestra.plugin.microsoft365.outlook.Send
    tenantId: "{{ secret('AZURE_TENANT_ID') }}"
    clientId: "{{ secret('AZURE_CLIENT_ID') }}"
    clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
    from: "[email protected]"
    to:
      - "[email protected]"
    subject: "Hello from Kestra"
    body: "<h1>Hello!</h1><p>This email was sent from a Kestra workflow.</p>"
    bodyType: "Html"

Send email with CC, BCC, and plain text

yaml
id: send_detailed_email
namespace: company.team

tasks:
  - id: send_email
    type: io.kestra.plugin.microsoft365.outlook.Send
    tenantId: "{{ secret('AZURE_TENANT_ID') }}"
    clientId: "{{ secret('AZURE_CLIENT_ID') }}"
    clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
    from: "[email protected]"
    to:
      - "[email protected]"
    cc:
      - "[email protected]"
      - "[email protected]"
    bcc:
      - "[email protected]"
    subject: "Important Notification"
    body: "This is a plain text email sent from Kestra workflow."
    bodyType: "Text"
Properties

Email body

Body content of the email

Client ID

Azure application (client) ID

Client Secret

Azure client secret

From address

Email address to send from (optional, uses authenticated user if not specified)

Email subject

Subject line of the email

Tenant ID

Azure tenant ID (directory ID)

SubType string

To recipients

List of email addresses to send the email to

SubType string

BCC recipients

List of email addresses to blind carbon copy

Body type

Content type of the email body (Html or Text)

SubType string

CC recipients

List of email addresses to carbon copy

Default https://graph.microsoft.com/.default

Scopes

Scopes for Microsoft Graph

User Principal Name

User email to act on behalf of (optional)

Default 0

BCC recipient count

Number of recipients in the 'bcc' field

Body type

Content type of the email body (Html or Text)

Default 0

CC recipient count

Number of recipients in the 'cc' field

Email subject

Subject line of the sent email

Default 0

To recipient count

Number of recipients in the 'to' field