Skip to main content

Destination

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a FlexFlow, DB-CDC, Spark ETL, or Replication data flow that sends data to a SendGrid location.
sendgrid_api.png

SendGrid

Create a SendGrid Destination

  1. Click the + icon on the Nexset that will be sent to the SendGrid destination, and select the Send to Destination option from the menu.

  2. Select the SendGrid connector from the list of available destination connectors. Then, select the credential that will be used to connect to your SendGrid account, and click Next; or, create a new SendGrid credential for use in this flow.

  3. In Nexla, SendGrid destinations can be created using pre-built endpoint templates, which expedite destination setup for common SendGrid endpoints. Each template is designed specifically for the corresponding SendGrid endpoint, making destination configuration easy and efficient.
    • To configure this destination using a template, follow the instructions in Configure Using a Template.

    SendGrid destinations can also be configured manually, allowing you to send data to SendGrid endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this destination manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common SendGrid endpoints. Each template is designed specifically for the corresponding SendGrid endpoint, making destination setup easy and efficient.

  • To configure this destination using a template, select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

    Mail Send

    This endpoint template allows you to send email over the SendGrid v3 Web API using records from a Nexset. Use this template when you need to send transactional or marketing emails through SendGrid. Check out the API documentation link for required record schema.

    • This endpoint sends data as JSON in the request body to send emails through your SendGrid account. Each record from your Nexset will be sent as a separate API request to send an email. The request body should contain the email data in the format required by the SendGrid API.

    This endpoint sends data as JSON in the request body to send emails through your SendGrid account. Each record from your Nexset will be sent as a separate API request to send an email. The request body should contain the email data in the format required by the SendGrid API, including recipient information, subject, content, and other email properties.

    The email structure must match the SendGrid API's expected format. For detailed information about email sending, request body formats, required record schema, and available email properties, see the SendGrid API documentation.

Configure Manually

SendGrid destinations can be manually configured to send data to any valid SendGrid API endpoint. Manual configuration provides maximum flexibility for accessing endpoints not covered by pre-built templates or when you need custom API configurations.

Using manual configuration, you can also configure Nexla to automatically send the response received from the SendGrid API after each call to a new Nexla webhook data source.

API Method

  1. To manually configure this destination, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the SendGrid API from the Method pulldown menu. SendGrid API typically uses POST method for creating resources and sending emails.

Data Format

  1. Select the format in which the Nexset data will be sent to the SendGrid API from the Content Format pulldown menu. SendGrid API expects JSON format for all requests.

API Endpoint URL

  1. Enter the URL of the SendGrid API endpoint to which data will be sent in the URL field. This should be the complete URL to your SendGrid endpoint (e.g., https://api.sendgrid.com/v3/mail/send). Include any required query parameters in the URL.

Ensure the API endpoint URL is correct and accessible with your current credentials. The SendGrid API endpoint URL should point to the endpoint where you want to send emails or create resources. The endpoint URL should include the API version (/v3/) and the resource type path. You can test the endpoint using the Test button after configuring the URL.

Request Body

  1. Configure the request body that will be sent to the SendGrid API. The request body should contain the resource data formatted as JSON, with field names matching the SendGrid API's expected structure. The request body format is typically {message.json} to send the entire Nexset data as JSON, or you can construct a custom JSON structure with specific field mappings.

The request body must be valid JSON and must match the SendGrid API's expected format for the specific endpoint you're using. SendGrid API uses specific structures for different endpoints (mail send, contacts, etc.). For detailed information about request body formats, available endpoints, and resource structures, see the SendGrid API documentation.

Save the Destination

  1. Once all of the relevant steps in the above sections have been completed, click the Next button to proceed with the rest of the data flow configuration, or click Save to save the destination configuration for later use.