In this tutorial you will learn how to configure Sendgrid in a way that allows you to send an email with an integration step. Only takes 5 minutes.

Step 1: Configure Sendgrid

Step 2: Configure Next Matter

FAQ

Step 1: Configure Sendgrid

Sign in to Sendgrid as an administrator and Navigate to Settings --> API keys

Select "Create API-Key" on the top right and configure the scopes needed for the integration.

Make sure to copy and safely store the API-Key shown, you will need it later and it is only displayed once.

Step 2: Configure the Next Matter Step

Select the Next Matter process that should integrate with Sendgrid, open the editor and add a new Integration step at the right point in the process.

You can also use our step templates to create the required steps.The step template will use Next Matters own Sendgrid account, so all emails will be send from a Next Matter email address. To use your Sendgrid account, change the API Key in the Sendgrid step to your own Key.

POST https://api.sendgrid.com/v3/mail/send

Headers:

Content-Type application/json
Authorization Bearer [YOUR_API_KEY_FROM_STEP_1_ABOVE]

Sample Body:

{
"from": {
"email": "notifications@nextmatter.com",
"name": "Next Matter Notifications"
},
"personalizations": [{
"to": [{
"email": "jane.doe@gmail.com"
}],
"dynamic_template_data": {
"email-subject": "This is my email",
"email-content": "Hello world"
}
}],
"template_id": "d-1ab0b3cd57213c18225a28c96ed78f7f"
}

  • Of course you can configure the "from" email according to your preferred sender email that is part of your Sendgrid setup

  • The recipient email is oftentimes a data-reference from a previous step

  • You can use data references in the email-subject, content and attachments (not shown in here)

  • The template_id can be found at Sendgrid --> Email Api --> Dynamic Templates

FAQ

  • What email configurations are available?

  • Is it possible to send attachments?

  • Is it possible to display / use the response that is retrieved from the Sendgrid Email API?

  • Can I send emails to multiple recipients?

    • Yes, you can repeat the information in the "personalizations" section like this:

    • "to": [
      { "email": "jane.doe@gmail.com"},
      { "email": "anastasia.doe@gmail.com"}
      ]
  • Can I set someone CC?

    • Yes, you can add that to the "personalizations" like this:

    • "personalizations": [{
      "to": ...
      "cc": [{
      "email": "jane.doe@gmail.com"
      }],

Did this answer your question?