ByteChef LogoByteChef

Sendgrid

Trusted for reliable email delivery at scale.

Categories: Communication, Marketing Automation

Type: sendgrid/v1


Connections

Version: 1

Bearer Token

Properties

NameLabelTypeDescriptionRequired
tokenTokenSTRINGtrue

Connection Setup

  1. Open your Dashboard: https://app.sendgrid.com .
  2. Click on Settings and choose API Keys.
  3. Click on Create API Key.
  4. Enter API Key Name, choose Full Access permissions and click on Create & View.
  5. Copy your generated API key and use it in Bytechef.

Actions

Send Email

Name: sendEmail

Sends an email.

Properties

NameLabelTypeDescriptionRequired
fromFromSTRINGEmail address from which you want to send.true
toToARRAY
Items [STRING]
Email addresses which you want to send to.true
ccCCARRAY
Items [STRING]
Email address which receives a copy.false
subjectSubjectSTRINGSubject of your email.true
textMessage BodySTRINGThe message you want to send.true
typeMessage TypeSTRING
Options text/plain, text/html
Message type for your content.true
attachmentsAttachmentsARRAY
Items [FILE_ENTRY]
A list of attachments you want to include with the email.false

Example JSON Structure

{
  "label" : "Send Email",
  "name" : "sendEmail",
  "parameters" : {
    "from" : "",
    "to" : [ "" ],
    "cc" : [ "" ],
    "subject" : "",
    "text" : "",
    "type" : "",
    "attachments" : [ {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    } ]
  },
  "type" : "sendgrid/v1/sendEmail"
}

Output

This action does not produce any output.

Send Dynamic Template

Name: sendDynamicTemplate

Send an email using a dynamic template.

Properties

NameLabelTypeDescriptionRequired
fromFromSTRINGEmail address from which you want to send.true
toToARRAY
Items [STRING]
Email addresses which you want to send to.true
ccCCARRAY
Items [STRING]
Email address which receives a copy.false
template_idTemplate IDSTRINGDynamic template ID.true
dynamic_template_dataDynamic Template DataOBJECT
Properties {}
Data passed to the SendGrid dynamic template.false
attachmentsAttachmentsARRAY
Items [FILE_ENTRY]
A list of attachments you want to include with the email.false

Example JSON Structure

{
  "label" : "Send Dynamic Template",
  "name" : "sendDynamicTemplate",
  "parameters" : {
    "from" : "",
    "to" : [ "" ],
    "cc" : [ "" ],
    "template_id" : "",
    "dynamic_template_data" : { },
    "attachments" : [ {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    } ]
  },
  "type" : "sendgrid/v1/sendDynamicTemplate"
}

Output

This action does not produce any output.

Find Template ID

To find the Template ID, click here.

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.


Additional Instructions

How to find Template ID

  • Method 1: Via UI

To find a Template ID, open your dashboard. In the left bar choose Email API -> Dynamic Templates. Expand the template you want to use and there you will find Template ID.

  • Method 2: Via API

Use the GET /templates?generations=dynamic endpoint to retrieve a list of all dynamic templates and their IDs.

How is this guide?

Last updated on

On this page