Back to Lowdefy

@lowdefy/connection-sendgrid

code-docs/plugins/connections/sendgrid.md

5.2.01.8 KB
Original Source

@lowdefy/connection-sendgrid

SendGrid email connection for Lowdefy.

Connection Type

TypePurpose
SendGridConnect to SendGrid

Connection Configuration

yaml
connections:
  - id: email
    type: SendGrid
    properties:
      apiKey:
        _secret: SENDGRID_API_KEY

Request Type

TypePurpose
SendGridSendSend email

SendGridSend

yaml
requests:
  - id: sendWelcome
    type: SendGridSend
    connectionId: email
    properties:
      to:
        _state: userEmail
      from: [email protected]
      subject: Welcome to Our App
      text: |
        Hi {{ name }},
        Welcome to our platform!
      html: |
        <h1>Hi {{ name }},</h1>
        <p>Welcome to our platform!</p>
      templateData:
        name:
          _state: userName

Properties

PropertyTypeDescription
tostring/arrayRecipient(s)
fromstringSender address
subjectstringEmail subject
textstringPlain text body
htmlstringHTML body
templateIdstringSendGrid template ID
templateDataobjectTemplate variables

Using Templates

yaml
requests:
  - id: sendFromTemplate
    type: SendGridSend
    connectionId: email
    properties:
      to:
        _state: email
      from: [email protected]
      templateId: d-xxxxxxxxxxxxx
      templateData:
        first_name:
          _state: firstName
        order_id:
          _state: orderId