MiN8T All Insights

What are Data Sources? How to Create and Use Them

M
MiN8T Team
Email Engineering

1 What are Data Sources?

A Data Source is a place where you store structured data that gets pulled into your AMP emails in real-time. When a recipient opens your email in Gmail, Yahoo, Mail.ru, FairEmail, or AOL, the email fetches fresh data from your Data Source endpoint — so the content is always up to date.

This powers dynamic use cases like:

Data Sources are managed at the account level — not per template. You create them once in the Data Sources dashboard, and reuse them across any number of email templates.

i

MiN8T supports two source types: JSON file (paste your own JSON) and Google Sheets (connect via OAuth). Both generate a public, CORS-compliant endpoint URL that AMP emails fetch data from.

2 Creating a JSON Data Source

Step 1: Open Data Sources Dashboard

In the MiN8T sidebar, click "Data Sources" (database icon). This opens the Data Sources dashboard at /data-sources.

Step 2: Click "New Source"

Click the "+ New Source" button in the subheader. A modal opens with the creation form.

Step 3: Fill in Source Details

  1. Name (required) — e.g., "Product Catalog", "Weekly Deals"
  2. Description (optional) — e.g., "Latest products from online store"
  3. Source Type — click "JSON"

Step 4: Paste JSON Content

Paste your JSON into the editor. The JSON must follow this structure:

{
  "items": [
    {
      "title": "Samsung Galaxy Note 10",
      "url": "https://shop.com/samsung",
      "imgUrl": "https://cdn.shop.com/samsung.jpg",
      "price": "$999.99",
      "text": "The latest flagship smartphone"
    },
    {
      "title": "iPhone 15 Pro",
      "url": "https://shop.com/iphone",
      "imgUrl": "https://cdn.shop.com/iphone.jpg",
      "price": "$1199.99",
      "text": "Pro camera. Pro display."
    }
  ]
}

Rules:

As you type, MiN8T validates the JSON in real-time. A green checkmark shows: "Valid JSON - 2 items - title, url, imgUrl, price, text". Red errors appear for invalid syntax, missing items array, or HTTPS violations.

!

HTML tags like <script>, event handlers (onclick), and javascript: URIs are automatically stripped from JSON values on save. This protects against stored XSS.

Step 5: Configure Options

Step 6: Save

Click "Create Source". MiN8T generates a unique endpoint URL and the source appears in your dashboard as a card with:

3 Creating a Google Sheets Data Source

Instead of pasting JSON, you can connect a Google Spreadsheet. The first row of your sheet becomes the variable names, and each subsequent row becomes an item.

Step 1: Create Source and Select Google Sheets

Click "+ New Source", enter a name, and click the "Google Sheets" button.

Step 2: Sign In with Google

Click "Sign in with Google". A popup opens with Google's OAuth consent screen. Authorize MiN8T to access your spreadsheets (read-only — MiN8T cannot modify your sheets).

i

The OAuth popup closes automatically after authorization. Your modal transitions to the spreadsheet picker.

Step 3: Select a Spreadsheet

A list of your Google Drive spreadsheets appears. You can:

Click the spreadsheet you want to use.

Step 4: Select a Sheet Tab

If your spreadsheet has multiple tabs, select which sheet contains your data. Click the sheet name to connect it.

Step 5: Connected

MiN8T reads the column headers and displays:

Your spreadsheet structure should look like:

| title          | url              | imgUrl              | price   |
|----------------|------------------|----------------------|---------|
| Samsung Galaxy | https://shop.com | https://cdn/sam.jpg  | $999    |
| iPhone 15 Pro  | https://shop.com | https://cdn/iph.jpg  | $1199   |

Column headers become mustache variables: {{title}}, {{url}}, {{imgUrl}}, {{price}}.

4 The Public Endpoint

Every Data Source gets a unique, public endpoint URL:

https://api.min8t.com/emailformdata/v1/list/{hash}/{name}

In development:

http://localhost:3001/emailformdata/v1/list/{hash}/{name}

The {hash} is a 64-character cryptographic random string — it acts as the authentication. Anyone with the URL can read the data, but the hash is unpredictable (256 bits of entropy).

What the Endpoint Returns

GET /emailformdata/v1/list/{hash}/{name}

Response (200):
{
  "items": [
    { "title": "Samsung Galaxy Note 10", "url": "...", "imgUrl": "...", "price": "$999" },
    { "title": "iPhone 15 Pro", "url": "...", "imgUrl": "...", "price": "$1199" }
  ]
}

AMP CORS Headers

The endpoint automatically sets all required AMP CORS headers:

Allowed origins: Gmail, Yahoo, Mail.ru, AOL, FairEmail. Rate limited to 100 requests per minute per IP.

You don't need to configure CORS yourself. MiN8T handles all AMP-required headers automatically.

5 Using Data Sources in the Email Editor

Unlike traditional editors where you manually paste <amp-list> code, MiN8T lets you connect data sources visually — no code required.

Step 1: Design Your Product Card

In the editor, drag text, image, and button blocks into a container. Style them as your product card layout — fonts, colors, spacing, everything.

Step 2: Open the Data Tab

Select the container (or structure/stripe). In the property panel, click the "Data" tab.

Step 3: Select "AMP Data Source"

You'll see two options: "Website Page" (for OG tag scraping) and "AMP Data Source". Under AMP Data Source, a dropdown lists all your active data sources.

Step 4: Pick a Data Source

Select your data source from the dropdown. The panel shows:

Step 5: Auto-Map Variables

Click "Auto-map to blocks". MiN8T intelligently maps your data source fields to the blocks in your container:

The mapping summary shows which block received which variable. You can also type {{variables}} manually into any block content.

No code required. MiN8T automatically wraps your container in <amp-list> on export. The AMP scripts (amp-list-0.1.js, amp-mustache-0.2.js) are auto-injected. You just pick a source and map variables.

SMART Badge

When a container, structure, or stripe has a data source connected, a blue "SMART" badge appears on it in the canvas. This visual indicator shows which elements are data-driven.

6 Randomizer

When enabled, the randomizer shuffles the items array using a Fisher-Yates algorithm before each response. Each recipient sees products in a different order — useful for A/B testing product placement or keeping content fresh.

The shuffle happens server-side after cache retrieval but before the response. The canonical order stays in the cache; only the response is randomized.

Toggle it on in the create/edit modal under the cache TTL setting.

7 Updating Content After Sending

This is the key advantage of AMP Data Sources: you can update content after the email is sent.

  1. Go to the Data Sources dashboard
  2. Click "Edit" on your data source
  3. Update the JSON (or the Google Sheet updates automatically)
  4. Save

The next time a recipient opens the email, they see the updated content. No need to resend the campaign.

!

Gmail may stop rendering AMP content after approximately 30 days. After that, recipients see the static HTML fallback. Design your fallback accordingly.

Deactivating a Source

If you deactivate a data source (toggle the status to "Inactive"), the endpoint returns a 404. AMP clients will fall back to the HTML version. Reactivate at any time to restore dynamic content.

8 Next Steps

Last updated: April 2026. All details verified against MiN8T's actual codebase implementation.