SendGrid
Updated:
What is SendGrid?
SendGrid
is a cloud-based SMTP
provider that allows you to send email without having to maintain email servers. SendGrid
manages all of the technical details, from scaling the infrastructure to ISP outreach and reputation monitoring to whitelist
services and real time analytics.
As APPSeCONNECT
is a Business Process Automation tool, this will allow you to develop and configure seamless integration between business applications.
Therefore, application configuration is a fundamental activity prior to the process of integration. If your chosen application is
SendGrid
, credentials need to be provided for validating the agent in case of OP
agent. Here you will find the detailed description on
how to configure the agents for the application SendGrid
, troubleshooting issues and their APIs.
Pre-requisites for SendGrid Configuration
1) Create a developer account in SendGrid with necessary credentials.
2) Click here to know the authentication mechanism and
different APIs of the application along with their structures.
How to generate the API Token
Log in to your SendGrid
application with valid credentials. From dashboard, navigate to Settings
-> API Keys
.
Click on Create API Key
and select the access type as Full Access
. Finally, click on Create & View
. On performing the same, a API key will be generated and will be provided to you.
On-Premise Agent Configuration
Installation of On-Premise Agent
You need to install the agent on your local server. To Know about On-Premise Agent Configuration, Click here.
Configure the SendGrid Application in OP Agent
1) Create a processflow with sendgrid as source or destination application, and deploy the processflow in On-Premise agent.
2) Open the agent and click the checkbox in Settings Panel.
3) Move into the App Configurational Panel of the agent and configure the details of the respective application.
Steps to Configure the credentials in OP Agent
1) Open the OP Agent by providing correct credentials.
2) In the App Configurations panel of the agent, click on the +
button, beside the application sendgrid.
The credential panel opens for the application sendgrid.
3) Enter API Token
at the required place.
4) Click on the “Validate” button, to validate the connection. A message Validation Successful.Now you can save the key
will appear
if all the credentials provided by you for sendgrid is valid. After validating the credentials. Click “Save” button to save the credetials.
Following the above processes, you can configure the SendGrid
application in the OP agent.
Cloud Agent Configuration
Configure the SendGrid Application in Cloud Agent
-
Login to
APPSeCONNECT
portal with valid credentials. -
Navigate to Manage > App. Expand the SendGrid application and click on
Credential
. -
Expand the
REST
node, click onAdd New Credential
. -
Provide the necessary information
Credential Name
andAPI Key
.
-
Click on Save and a toaster message will be displayed confirming the same.
Troubleshooting
ISSUE 1 : User Account should be created as Developer in SendGrid application.
You should create an account in sendgrid application as developer user. After creating the account, you should create API Token
correctly.
ISSUE 2 : Agent Validation failed due to improper credential provided in the agent.
While validating the credentials in the agent, sometimes the validation fails due to improper
API Token
. Check the credentials once again and re-Validate the credentials.
Attributes and Actions
While defining a connection to an API in sendgrid
, you require clear understanding about the data requirements and endpoint configurations.
You can refer to this document to find all the endpoint details of your sendgrid application. To define the endpoint in APPSeCONNECT, you need
to define Schemas and Actions. Actions are specifically targeted for an endpoint while schema is the data needed to execute the API. Here is the
list of some of the pre-packaged API actions defined for you which you can easily plug and play while doing your integration.
You can refer to SendGrid application to know the authuorization and APIs details.
Endpoint | Action | Action Type | Schema | UI Help | API Path |
---|---|---|---|---|---|
mail send | /mail/send | POST | The Mail Send endpoint allows you to send email over SendGrid’s v3 Web API. | mail send | |
user | /user/profile | GET | user | Keeps your user profile up to date, helps SendGrid verify who you are and share important communications with you. | user |
contacts | /marketing/contacts | DELETE | Contacts | Enables you to delete contacts. | Contacts |
accounts | /partners/accounts | POST | Accounts | Creates a new account, with specified offering, under the organization. | Accounts |
Action Filter Implementation
Data is fetched from source application using APIs
, and as you are aware of, API provides filters
which will allow you to specify a subset of data from the whole bunch of data created in the server,
the same can be specified through Actions and Action filters. The Action generally defines the
endpoint of the application which is being fetched, while the filters define the search criteria
of the data. You can add any parameters in the action filter
to define the search criteria.
The parameters are added in the body section of the action filter. We shall look into, how
you can provide the action filter.
While retrieving some information from SendGrid
, you can restrict the number of information fetched from
the application. You need to configure the action filter depending on the API structure of the endpoints.
Click here to
know the action filter of the respective endpoints. In the current scenerio, you can use limit
,
offset
and email
as the filtering criteria. Simply, use these filters as key-value
pair in the action filter.
You can use any of the following as the filter conditions in the action filter.
-
limit
as the key and any numerical value in the value filter to fetch limited number of datas. -
offset
as the key and any numerical value to specify the number of records to skip. -
email
as the key and provide any valid email id in the action filter.