SendGrid

SendGrid (Twilio) is a transactional and marketing email platform with high-deliverability infrastructure and a marketing automation suite (SendGrid Marketing Campaigns).

⚠️

This integration is currently in alpha. Configuration and behaviour may change. This integration covers contact list / Marketing Campaigns sync. For one-off transactional emails, use SendGrid’s Mail Send API directly.

Prerequisites

Complete these steps in SendGrid before configuring Signal.

Access your SendGrid account

Log in to app.sendgrid.com. You need a SendGrid plan that includes Marketing Campaigns or contact list management.

Create an API Key

Navigate to Settings > API Keys and click Create API Key. Configure:

  1. Name: e.g. “Datafly Signal”.
  2. Permissions: select Restricted Access and grant at minimum:
    • Marketing → Read, Write (contacts, lists, custom fields).
  3. Click Create & View.
  4. Copy the API Key immediately — it will not be shown again.

Find or create a Marketing List (optional)

If you want all Signal-identified contacts added to a specific list, navigate to Marketing > Contacts > Lists. Note the List ID of the target list.

Identify Custom Field IDs (optional)

Custom contact fields have numeric IDs in SendGrid. Navigate to Marketing > Contacts > Custom Fields to view them. Signal can map Datafly traits to these.

Configuration

FieldTypeRequiredDescription
api_keysecretYesSendGrid API key with Marketing read/write scopes.
default_list_idstringNoList ID to auto-add identified contacts to.

Signal Setup

Quick Setup

  1. Navigate to Integrations in the sidebar.
  2. Open the Integration Library tab.
  3. Find SendGrid under the Marketing Automation category.
  4. Click Install, and fill in the required fields.
  5. Click Install Integration.

API Setup

curl -X POST http://localhost:8084/v1/admin/integration-catalog/sendgrid/install \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "SendGrid",
    "variant": "default",
    "config": {
      "api_key": "SG.xxxxxxxxxxxxxxxxxxxx",
      "default_list_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    },
    "delivery_mode": "server_side"
  }'

Event Mapping

Datafly EventSendGrid ConceptNotes
pageCustom field updateLast page URL written to a custom field for segmentation.
Product ViewedCustom field updateLast product ID stored as a custom field.
Order CompletedContact upsert with revenueContact updated with last_purchase_at, lifetime_value.
identifyContact upsertEmail and traits sent via PUT /v3/marketing/contacts.

Identity

FieldSourceNotes
emailtraits.emailSendGrid’s primary contact key.
first_nametraits.first_nameStandard contact field.
last_nametraits.last_nameStandard contact field.
phone_numbertraits.phoneOptional contact field.
external_iduser_id from datafly.identify()Stable cross-reference to your customer ID (stored as a custom field).

SendGrid events should be sent under the marketing consent category. SendGrid maintains its own unsubscribe groups — Signal forwards CMP consent state so workflows can update opt-in/opt-out status as needed.

Verify it’s working

  1. Trigger a test identify event from your website.
  2. In SendGrid, navigate to Marketing > Contacts and search for the test contact by email.
  3. Open the contact to view custom field values and list membership.
  4. In Signal, check Live Events to confirm delivery with a 202 response status (SendGrid upserts are asynchronous).

Troubleshooting

SymptomPossible CauseResolution
401 UnauthorizedInvalid API key or missing scopesVerify the key in Settings > API Keys and ensure Marketing read/write permissions are granted.
Contact upsert pendingAsynchronous processingSendGrid contact upserts return 202 and process asynchronously — allow a few minutes before checking.
Custom field errorField ID mismatchConfirm the custom field IDs in Marketing > Contacts > Custom Fields.
429 Too Many RequestsRate limit exceededSendGrid enforces per-account contact-upsert limits. Signal retries automatically.

See also