SendGrid
Connect SendGrid to power email triggers in Skrym
SendGrid is the provider used for email triggers in Skrym. Once connected, you can choose SendGrid dynamic templates for milestone-based emails in your order journeys.
InfoThis integration currently supports dynamic templates only. Legacy templates are not supported.
Before you start
You will need:
- An active SendGrid account
- A SendGrid API key with permission to send mail and read templates
- At least one dynamic template in SendGrid
For how email triggers work in Skrym, what data is sent to templates, and example payload usage, see the email triggers documentation.
Create a SendGrid API key
To connect Skrym with SendGrid:
- Log in to your SendGrid account
- Navigate to Settings > API Keys
- Click Create API Key
- Give the key a descriptive name, for example
Skrym Integration - Choose Restricted Access and grant at least:
- Mail Send: Full Access
- Template Engine: Read Access
- Click Create & View
- Copy the API key immediately
If needed, refer to the official SendGrid documentation on API keys.
WarningYour API key is encrypted before being stored in Skrym. After saving it, you can update or replace it later, but you cannot view the original value again from Skrym.
Connect SendGrid in Skrym
- Open Integrations in the Skrym dashboard
- Go to the Systems tab
- Find SendGrid and click Configure or Connect
- Enter:
- Name: A descriptive label for the integration
- API Key: The API key you created in SendGrid
- Click Save
Test the connection
After saving, use Test Connection to verify the integration.
If the test succeeds, Skrym fetches your dynamic templates from SendGrid and shows:
- Template preview thumbnails when available
- Template names
- Template IDs
- Number of template versions
This is the easiest way to confirm both API access and template visibility before configuring journey triggers.
Using SendGrid with email triggers
After the integration is connected:
- Open your order journey milestone in Skrym
- Add or edit an email trigger
- Select the SendGrid integration
- Map a SendGrid template ID per language where needed
Skrym then sends the trigger payload to SendGrid when that milestone is completed.
SendGrid-specific notes
- Skrym uses the tracked order's
recipientEmailas the recipient when it is available. - Template localization is selected from the tracked order's
recipientLocalePreferencewhen present. Otherwise, Skrym falls back to the destination location country, then the tracked order destination country code, and finally English. - Template IDs are configured per language in the trigger, and Skrym falls back to the
defaulttemplate when no exact locale match is configured. - Template authoring in SendGrid uses Handlebars syntax.
Template authoring tips
- Keep the email structure and branding in SendGrid, not in Skrym.
- Use the trigger payload from the tracking docs as the source of truth for available variables.
- Start with a minimal template that renders
trigger,order, and localized date fields before adding more advanced conditional content.
Example SendGrid template
SendGrid dynamic templates use Handlebars syntax. The example below focuses on SendGrid-specific template authoring and assumes the payload described in the email triggers documentation.
<h1>Your order is on the move</h1><p>{{#if order.destination.name}}Hi {{order.destination.name}},{{else}}Hi,{{/if}}</p><p>Your order reached the milestone <strong>{{trigger.milestoneReference}}</strong>.</p>{{#if formattedData.order.dates.orderPromisedDeliveryTimeEnd}}<p>Expected delivery: {{formattedData.order.dates.orderPromisedDeliveryTimeEnd.dateOnly}}</p>{{/if}}{{#if formattedData.order.transportMethodName}}<p>Shipping method: {{formattedData.order.transporterName}} - {{formattedData.order.transportMethodName}}</p>{{/if}}{{#each formattedData.shipments}}{{#if this.trackingReference}}<p>Tracking number: {{this.trackingReference}}</p>{{/if}}{{#if this.trackingUrl}}<p><a href="{{this.trackingUrl}}">Track your shipment</a></p>{{/if}}{{/each}}
This kind of example is a good starting point for validating that your SendGrid template can:
- Read nested values from the Skrym payload
- Use Handlebars conditionals such as
if - Iterate collections such as
order.shipments - Use preformatted values directly from
formattedData
Note that the payload uses JSON field names from the API response, so template paths are lowercase like order.order, order.destination, and order.shipments.
For the available template data, example JSON, formatted date fields, and Handlebars examples, continue in the email triggers documentation.