Overview
Configuration is provided for establishing connections with the SendGrid service. The configuration is used in the REST Connection Manager.
Setup
Press icon to get more information about the connection parameters.
Obtain data
Use REST Source component to get data from service resource.
Insert data
Use REST Destination component to insert data into service resource.
Quick Start
In this task, we will show you step-by-step how to create a connection to SendGrid REST API using COZYROC's REST Connection Manager.
Step 1. Go to SendGrid Settings -> API Keys page and generate API Key.
Congratulations! You have now established a connection to your SendGrid instance.
In this guide, we will show how to read data from SendGrid service resource using COZYROC REST Source component.
In this guide, we will show how to write data to SendGrid service resource using the COZYROC REST Destination component.
Configuration
Base URL address: https://api.sendgrid.com/v3
.
-
The authentication uses a parameters-based authentication.
The authentication has the following user-defined parameters:
- APIKey: Required. Specify API key.
- OnBehalfOf: Specify subuser on whom behalf you make the calls. Optional.
The following request parameters will be automatically processed during the authentication process:
-
Authorization:
Bearer {{=connection.user.APIKey}}
-
on-behalf-of:
{{=connection.user.OnBehalfOf}}
Documentation: https://sendgrid.api-docs.io/v3.0/how-to-use-the-sendgrid-v3-api/api-authentication.
Based on resource template Base.
- [Read mail] action
-
Endpoint URL address:
/mail_settings
.
The result is extracted from:{{=response.result}}
.Documentation: https://sendgrid.api-docs.io/v3.0/settings-mail.
- [Read partner] action
-
Endpoint URL address:
/partner_settings
.
The result is extracted from:{{=response.result}}
.Documentation: https://sendgrid.api-docs.io/v3.0/settings-partner.
- [Read tracking] action
-
Endpoint URL address:
/tracking_settings
.
The result is extracted from:{{=response.result}}
.Documentation: https://sendgrid.api-docs.io/v3.0/settings-tracking.
- name
Template: ShortText.
- title
Template: ShortText.
- enabled
Data type: DT_BOOL
- description
Template: ShortText.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/teammates
.
The result is extracted from:{{=response.results}}
.
- [Read pending] action
-
Endpoint URL address:
/teammates/pending
.
- [Create] action
-
Endpoint URL address:
/teammates
.
- [Delete] action
-
Endpoint URL address:
/teammates/{{=item.username}}
.
- username
A key field. Template: ShortText.
Template: ShortText.
- first_name
Template: ShortText.
- last_name
Template: ShortText.
- user_type
Template: ShortText.
- is_admin
Data type: DT_BOOL
- phone
Template: ShortText.
- website
Template: ShortText.
- company
Template: ShortText.
- address
Template: ShortText.
- address2
Template: ShortText.
- city
Template: ShortText.
- state
Template: ShortText.
- country
Template: ShortText.
- zip
Template: ShortText.
- expiration_date
Template: UnixTime. A read-only field.
- pending_id
Template: ShortText. A read-only field.
- scopes
Template: LongText. A composite field.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/alerts
.
- [Create] action
-
Endpoint URL address:
/alerts
.
- [Update] action
-
Endpoint URL address:
/alerts/{{=item.id}}
.
- [Delete] action
-
Endpoint URL address:
/alerts/{{=item.id}}
.
- id
A key field. Data type: DT_I4
- email_to
Template: ShortText.
- percentage
Data type: DT_I4
- type
Template: ShortText.
- frequency
Template: ShortText.
- created_at
Template: DateTime. A read-only field.
- updated_at
Template: DateTime. A read-only field.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/subusers
.
- [Create] action
-
Endpoint URL address:
/subusers
.
- [Delete] action
-
Endpoint URL address:
/subusers/{{=item.username}}
.
- id
A key field. Data type: DT_I4
- disabled
Data type: DT_BOOL
Template: ShortText.
- username
A key field. Template: ShortText.
- password
Template: ShortText.
- ips
Template: LongText. A composite field.
- branded_link
Template: BrandedLink. A read-only field. The value is gathered from
/whitelabel/links/subuser/{{=item.username}}
address.- authenticated_domain
Template: AuthDomain. A read-only field. The value is gathered from
/whitelabel/domains/subuser/{{=item.username}}
address.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/whitelabel/links
.
- [Create] action
-
Endpoint URL address:
/whitelabel/links
.
- [Update] action
-
Endpoint URL address:
/whitelabel/links/{{=item.id}}
.
- [Delete] action
-
Endpoint URL address:
/whitelabel/links/{{=item.id}}
.
The resource includes the fields from the BrandedLink template.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/whitelabel/ips
.
- [Create] action
-
Endpoint URL address:
/whitelabel/ips
.
- [Delete] action
-
Endpoint URL address:
/whitelabel/ips/{{=item.id}}
.
- id
A key field. Data type: DT_I4
- ip
Template: ShortText.
- rdns
Template: ShortText.
- users
A read-only field. Field components:
- An array.
- Contains the following components: username, user_id.
- subdomain
Template: ShortText.
- domain
Template: ShortText.
- valid
Data type: DT_BOOL
- legacy
Data type: DT_BOOL
- a_record
Template: DnsRecord.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/ips
.
- [Read assigned] action
-
Endpoint URL address:
/ips/assigned
.
- ip
Template: ShortText.
- pools
Template: LongText. A composite field.
- whitelabeled
Data type: DT_BOOL
- subusers
Template: LongText. A composite field.
- warmup
Data type: DT_BOOL
- assigned_at
Template: UnixTime.
- start_date
Template: UnixTime.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/whitelabel/domains
.
- [Create] action
-
Endpoint URL address:
/whitelabel/domains
.
- [Update] action
-
Endpoint URL address:
/whitelabel/domains/{{=item.id}}
.
- [Delete] action
-
Endpoint URL address:
/whitelabel/domains/{{=item.id}}
.
The resource includes the fields from the AuthDomain template.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/designs
.
The result is extracted from:{{=response.result}}
.
- [Create] action
-
Endpoint URL address:
/designs
.
- [Update] action
-
Endpoint URL address:
/designs/{{=item.id}}
.
- [Delete] action
-
Endpoint URL address:
/designs/{{=item.id}}
.
- id
A key field. Data type: DT_I4
- name
Template: ShortText.
- html_content
Template: LongText.
- plain_content
Template: LongText.
- generate_plain_content
Data type: DT_BOOL
- subject
Template: ShortText.
- editor
Template: ShortText.
- categories
Template: LongText. A composite field.
- created_at
Template: DateTime. A read-only field.
- updated_at
Template: DateTime. A read-only field.
- thumbnail_url
Template: ShortText. A read-only field.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/marketing/contacts
.
The result is extracted from:{{=response.result}}
.
- [Read search] action
-
Endpoint URL address:
/marketing/contacts/search
.
The result is extracted from:{{=response.result}}
.
The action uses POST method.The action has the following user-defined parameters:
- query: Required. Specify SGQL search query.
- [Create] action
-
Endpoint URL address:
/marketing/contacts
.
The action uses PUT method.The following request parameters will be automatically processed:
-
application/json:
{{={ contacts: batch } }}
-
application/json:
- [Delete] action
-
Endpoint URL address:
/marketing/contacts
.The following request parameters will be automatically processed:
-
ids:
{{=_.map(batch, function(item) { return item.id; }).join()}}
-
ids:
- id
A key field. Template: ShortText.
- address_line_1
Template: ShortText.
- address_line_2
Template: ShortText.
- alternate_emails
Template: ShortText.
- city
Template: ShortText.
- country
Template: ShortText.
Template: ShortText.
- first_name
Template: ShortText.
- last_name
Template: ShortText.
- list_ids
Template: LongText. A composite field.
- postal_code
Template: ShortText.
- state_province_region
Template: ShortText.
- phone_number
Template: ShortText.
Template: ShortText.
- line
Template: ShortText.
Template: ShortText.
- unique_name
Template: ShortText.
- _metadata
A read-only field. Field components:
-
Uses template:
ShortText
. - Contains the following components: self.
-
Uses template:
- created_at
Template: DateTime.
- updated_at
Template: DateTime.
- [External]
-
The external fields URL address:
/marketing/field_definitions
. The external fields list is extracted from:{{=response.custom_fields}}
.- custom_fields.{{=external.name}}
Data type: {{=SendGrid.getDataType(external.field_type)}} ( length 255 )
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/marketing/lists
.
The result is extracted from:{{=response.result}}
.
- [Create] action
-
Endpoint URL address:
/marketing/lists
.
- [Update] action
-
Endpoint URL address:
/marketing/lists/{{=item.id}}
.
- [Delete] action
-
Endpoint URL address:
/marketing/lists/{{=item.id}}
.
- id
A key field. Template: ShortText.
- name
Template: ShortText.
- contact_count
Data type: DT_I4 A read-only field.
- _metadata
A read-only field. Field components:
-
Uses template:
ShortText
. - Contains the following components: self.
-
Uses template:
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/marketing/segments
.
The result is extracted from:{{=response.results}}
.
- [Create] action
-
Endpoint URL address:
/marketing/segments
.
- [Update] action
-
Endpoint URL address:
/marketing/segments/{{=item.id}}
.
- [Delete] action
-
Endpoint URL address:
/marketing/segments/{{=item.id}}
.
- id
Template: ShortText.
- name
Template: ShortText.
- parent_list_id
Template: ShortText.
- query_dsl
Template: ShortText.
- contacts_count
Data type: DT_I4 A read-only field.
- sample_updated_at
Template: DateTime. A read-only field.
- created_at
Template: DateTime. A read-only field.
- updated_at
Template: DateTime. A read-only field.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/marketing/singlesends
.
- [Create] action
-
Endpoint URL address:
/marketing/singlesends
.
- [Update] action
-
Endpoint URL address:
/marketing/singlesends/{{=item.id}}
.
- [Delete] action
-
Endpoint URL address:
/marketing/singlesends
.The following request parameters will be automatically processed:
-
ids:
{{=_.map(batch, function(item) { return item.id; }).join()}}
-
ids:
- id
A key field. Template: ShortText.
- name
Template: ShortText.
- categories
Template: LongText. A composite field.
- sender_id
Data type: DT_I4
- status
Template: ShortText.
- custom_unsubscribe_url
Template: ShortText.
- suppression_group_id
Data type: DT_I4
- filter
Field components:
-
Uses template:
LongText
. - Contains the following components: list_ids, send_to_all.
-
Uses template:
- send_at
Template: DateTime.
- template_id
Template: ShortText.
- ip_pool
Template: ShortText.
- created_at
Template: DateTime. A read-only field.
- updated_at
Template: DateTime. A read-only field.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/suppression/blocks
.
- [Delete] action
-
Endpoint URL address:
/suppression/blocks
.The following request parameters will be automatically processed:
-
application/json:
{{={ emails: _.map(batch, function(item) { return item.email; }) } }}
-
application/json:
A key field. Template: ShortText.
- created
Template: UnixTime.
- reason
Template: ShortText.
- status
Template: ShortText.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/suppression/spam_reports
.
- [Delete] action
-
Endpoint URL address:
/suppression/spam_reports
.The following request parameters will be automatically processed:
-
application/json:
{{={ emails: _.map(batch, function(item) { return item.email; }) } }}
-
application/json:
A key field. Template: ShortText.
- ip
Template: ShortText.
- created
Template: UnixTime. A read-only field.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/suppression/unsubscribes
.
- [Create] action
-
Endpoint URL address:
/asm/suppressions/global
.The following request parameters will be automatically processed:
-
application/json:
{{={ recipient_emails: _.map(batch, function(item) { return item.email; }) } }}
-
application/json:
- [Delete] action
-
Endpoint URL address:
/asm/suppressions/global/{{=item.email}}
.
A key field. Template: ShortText.
- created
Template: UnixTime. A read-only field.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/asm/groups
.
- [Create] action
-
Endpoint URL address:
/asm/groups
.
- [Update] action
-
Endpoint URL address:
/asm/groups/{{=item.id}}
.
- [Delete] action
-
Endpoint URL address:
/asm/groups/{{=item.id}}
.
- id
A key field. Data type: DT_I4
- name
Template: ShortText.
- description
Template: ShortText.
- last_email_sent_at
Template: DateTime. A read-only field.
- is_default
Data type: DT_BOOL
- unsubscribes
Data type: DT_I4 A read-only field.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/asm/groups/{{=parameters.group_id}}/suppressions
.
The result is extracted from:{{=_.map(response, function(item){ return { email: item }; })}}
.The action has the following user-defined parameters:
- group_id: Required. Specify group identifier.
- [Read search] action
-
Endpoint URL address:
/asm/groups/{{=parameters.group_id}}/suppressions/search
.
The action uses POST method.The action has the following user-defined parameters:
- group_id: Required. Specify group identifier.
- recipient_emails: Required. Comma separated list of email addresses to search for.
The following request parameters will be automatically processed:
-
application/json:
{{={ recipient_emails: _.map(parameters.recipient_emails.split(','), function(item) { return item.email; }) } }}
- [Create] action
-
Endpoint URL address:
/asm/groups/{{=parameters.group_id}}/suppressions
.The action has the following user-defined parameters:
- group_id: Required. Specify group identifier.
The following request parameters will be automatically processed:
-
application/json:
{{={ recipient_emails: _.map(batch, function(item) { return item.email; }) } }}
- [Delete] action
-
Endpoint URL address:
/asm/groups/{{=parameters.group_id}}/suppressions/{{=item.email}}
.The action has the following user-defined parameters:
- group_id: Required. Specify group identifier.
A key field. Template: ShortText.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/suppression/invalid_emails
.
- [Delete] action
-
Endpoint URL address:
/suppression/invalid_emails
.The following request parameters will be automatically processed:
-
application/json:
{{={ emails: _.map(batch, function(item) { return item.email; }) } }}
-
application/json:
Template: ShortText.
- reason
Template: ShortText.
- created
Template: UnixTime. A read-only field.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/user/webhooks/parse/settings
.
The result is extracted from:{{=response.result}}
.
- [Create] action
-
Endpoint URL address:
/user/webhooks/parse/settings
.
- [Update] action
-
Endpoint URL address:
/user/webhooks/parse/settings/{{=item.hostname}}
.
- [Delete] action
-
Endpoint URL address:
/user/webhooks/parse/settings/{{=item.hostname}}
.
- hostname
A key field. Template: ShortText.
- url
Template: ShortText.
- spam_check
Data type: DT_BOOL
- send_raw
Data type: DT_BOOL
- [Read] action
-
The result is paginated.The following request parameters will be automatically processed:
-
offset:
{{=parameters.iterator}}
-
limit:
{{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
-
offset:
- [Create] action
-
The action uses POST method.The following request parameters will be automatically processed:
-
_includeUserParameters:
{{=parameters}}
-
application/json:
{{=item}}
-
_includeUserParameters:
- [Update] action
-
The action uses PATCH method.The following request parameters will be automatically processed:
-
_includeUserParameters:
{{=parameters}}
-
application/json:
{{=item}}
-
_includeUserParameters:
- [Delete] action
-
The action uses DELETE method.
- ShortText
Data type: DT_WSTR ( length 255 )
- LongText
Data type: DT_WSTR ( length 1000 )
- DateTime
Data type: DT_DBTIMESTAMP
- UnixTime
Data type: DT_DBTIMESTAMP The gathered value is processed with
{{=value && new Date(value * 1000).toUTCString()}}
expression.- DnsRecord
Field components:
-
Uses template:
ShortText
. - Contains the following components: valid, type, host, data.
-
Uses template:
- BrandedLink
Field components:
-
Uses template:
ShortText
. - Contains the following components: id, domain, subdomain, username, user_id, default, valid, legacy, dns.
-
Uses template:
- AuthDomain
Field components:
-
Uses template:
ShortText
. - Contains the following components: id, domain, subdomain, username, user_id, ips, custom_spf, default, legacy, automatic_security, valid, dns.
-
Uses template:
- EmailAddress
Field components:
-
Uses template:
ShortText
. - Contains the following components: email, name.
-
Uses template:
What's New
- Fixed: Corrected Bounce resource metadata.
- New: Updated 'Single Send' resource metadata as required. For further information, check here.
- Fixed: Modified to use Export API for 'Contact' resource because the previously used API no longer supports pagination.
- New: Introduced connection.
Related documentation
COZYROC SSIS+ Components Suite is free for testing in your development environment.
A licensed version can be deployed on-premises, on Azure-SSIS IR and on COZYROC Cloud.