Send Grid


The SendGrid Data Provider wraps the complexity of accessing SendGrid services in an easy-to-integrate, fully managed ADO.NET Data Provider. Applications then access SendGrid through the SendGrid Data Provider with simple Transact-SQL. The CData ADO.NET Provider for SendGrid hides the complexity of accessing data and provides additional powerful security features, smart caching, batching, socket management, and more.

Connection String

To use all the features of the provider, provide the User and Password connection properties. To connect with limited features, you can set the ApiKey connection property instead.

Connection String Parameters

Parameter Description
UserName The username of the currently authenticated user.
Password The password of the currently authenticated user.
APIKey The API key of the currently authenticated user. Note that the API key does not enable access to all of the functionality in SendGrid; to access user and subuser data, you must specify the User and Password.

Connecting to SendGrid

There are two authentication methods available for connecting to SendGrid. For full functionality, provide a User and Password. However, you can use the ApiKey to access limited functionality.

Using the API key

To obtain the API key, follow the steps below:

  1. Create an account using Log into SendGrid using the credentials.

  2. Click Settings. Click API Keys.

  3. Click Create API Key -> General API Key. The API key is then displayed.

  4. Use the API Key generated in the Connection String.

Using the Basic Authentication

Simply use your User and Password to have access to user and subuser data.

Data Migrations

To Check for the data migrations:

  1. Add a new connection in Loome Integrate as shown.

    • Go to tasks and click on Connections.

    • Add a new connection Using Add New Connection Option.

    • Choose SendGrid Connector from the available Connector Options.

  2. Using the connection string parameters created, Verify the connection using the VERIFY CONNECTION Option in Loome Integrate.

  3. Create a Job Using ADD A JOB option in Loome Integrate, add a data migration task to the job.

  4. Create a New Task by right clicking job list and then Add a New Task Option. If you want to edit an Existing Task Use Edit Task.

  5. Choose a Data Migration Task.

  6. Choose the source and the destination for the migration of data. Name the Task.

  7. Choose the Tables or the data that need to be migrated from the source to the destination. You can Copy all Tables by checking Copy all tables box.

  8. Execute the Job. Check for results and the details of the data migrated in Execution History.

Data Model

The provider models SendGrid APIs as relational tables, views, and stored procedures. Most tables, views, and stored procedures are defined in schema files, which are simple, text-based configuration files. However, the Recipients table is dynamic: The provider connects to SendGrid and gets the metadata for this table by calling the appropriate Web services. Any changes you make to the custom filters you define for Recipients are available when you connect; you can use these custom filters as columns in the WHERE clause. These custom filters are surfaced in the CustomFields table. API limitations and requirements are documented in this section; you can use the SupportEnhancedSQL feature, set by default, to circumvent most of these limitations


The provider models the SendGrid API as relational Tables that are easy to query and update. In addition to the tables, the provider also offers stored procedures and views, enabling you to work with other aspects of the SendGrid API, like adding recipients to lists, reporting statistics, etc.

Name Description
CustomFields Create, delete, and query Custom Fields in SendGrid.
Lists Create, update, delete, and query the available Lists in SendGrid.
MarketingCampaigns Create, update, delete, and query Marketing Campaigns in SendGrid.
Recipients The SendGrid table Recipients.
Schedules Create, update, delete, and query Campaign Schedules in SendGrid.
Segments Create, update, delete, and query Segments in SendGrid.
UnsubscribeGroups Create, update, delete, and query Unsubscribe Groups in SendGrid


Views are tables that cannot be modified. Typically, read-only data are shown as view.

Name Description
AdvancedStats Query Advanced Statistics in SendGrid.
Bounces Query the available Bounces in SendGrid.
CategoryStats Query the available Category Stats in SendGrid.
GlobalStats Query the available Global Stats in SendGrid.
ReservedFields Query the available Reserved Fields in SendGrid.
SubuserStats Query Subuser Statistics in SendGrid.
Users Query the available Users in SendGrid

Stored Procedures

Stored Procedures are function-like interfaces to Sendgrid. They can be used to search, update, and modify information in SendGrid.

Name Description
AddRecipientToList Adds a recipient to a list.
SendTestCampaign Sends a test campaign