SendGrid in Unqork

Overview

SendGrid is an external service that lets you set parameters, like the email's subject, content, and sender in an API APIs (application programming interfaces) are a set of protocols and definitions developers use to build and integrate application software. APIs act as the connective tissue between products and services. request body. In Unqork, you'll use a Plug-In component to make the API request and send emails to your senders using the SendGrid service.

What Is SendGrid?

SendGrid is a service that lets you customize emails and send them in your application using API calls. Examples of when you might use the SendGrid service include:

Configuration

Because SendGrid is an external service, you must set up a SendGrid account before you can integrate it with Unqork. In SendGrid, you must create unique sub-user accounts for each of your clients. In Unqork, you must set up the service using Services Administration. After setting up the service, you'll configure a Plug-In component to make the API call.

To learn more about Services Administration, view our Services Administration article.

SendGrid Accounts

After setting up a SendGrid account, SendGrid will authenticate each API call using unique API keys. To get an API key, create two SendGrid sub-user accounts to generate the API keys. Having sub-user accounts lets you test your SendGrid configurations, email templates, and so on without impacting those already in use.

Create the following SendGrid sub-user accounts:

  • Quality Assurance (QA)
  • Production (Prod)

Unqork Services Administration

Now that your SendGrid sub-user accounts are set up, use Services Administration to set up the service in your environment. After creating a new service, you'll authenticate it using a Service Protocol + Host of https://api.sendgrid.com/v3. Then, you'll use the API key received from SendGrid as the Bearer Token.

A static image displaying the Services Administration configuration to integrate with Unqork.

To learn more about setting up a service in Unqork, view our How to: Add a Service article.

SendGrid API Parameters

The final step is to configure a Plug-In component with desired parameters to make the API call. Once you’ve configured your Plug-In component, trigger it on button-click, the creation of a new submission, or with a Data Workflow component.

Each SendGrid API call requires the same base parameters in the request body. The most common parameters include:

Parameter Description

To

Recipients who will receive the email. Enter each recipient's email address, or the email address and name of the recipient.

From

Acts as the sender of the email. Enter the email address for the sender of the email, or a name and email address.

Content

The body of the email where you’ll specify your content and content type, like plain text, HTML HTML (Hyper Text Markup Language) is the standard markup language for for achieving font, color, graphic, and hyperlink effects when creating web pages., and so on.

Template ID

When you select a SendGrid template, its format applies to the email. Each template you create has a unique template ID. You’ll include that ID in your API call so SendGrid can determine which template to use.

To explore other SendGrid parameters, view the following SendGrid documentation: https://www.twilio.com/docs/sendgrid/api-reference.