SendGrid + Factr

Sync Factr enrichment with SendGrid to add personalized facts to your email campaigns. Automatically enrich contacts before sending.

Use case: Add personal insights to your SendGrid email campaigns for better open rates

Setup Guide

1

Connect Factr API

Store your Factr API key in your SendGrid integration backend.

2

Create a contact enrichment workflow

Use SendGrid webhooks to trigger Factr on new contact creation.

3

Add enrichment to contact data

Store the returned facts as custom fields in SendGrid.

4

Reference in email templates

Use SendGrid's substitution tags to include personalized facts in emails.

Code Example

JavaScript / Node.js
// SendGrid contact enrichment
const sgMail = require('@sendgrid/mail');
const factrApiKey = process.env.FACTR_API_KEY;

async function enrichContact(email) {
  // Call Factr API
  const response = await fetch('https://factr.polsia.app/api/enrich', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ email, apiKey: factrApiKey })
  });

  const { fact } = await response.json();

  // Store in SendGrid custom field
  return {
    email,
    custom_fields: {
      enriched_fact: fact
    }
  };
}

Key Benefits

Ready to integrate?

Join our waitlist and get early access to Factr with priority support for your integration.