Skip to content
Learn › Get data in › Connectors: open the docs menu

Connect SendGrid to Mammoth with an API key

The SendGrid connector imports email delivery data from your SendGrid account into Mammoth as a dataset. It signs in with a SendGrid API key, with no OAuth step. Open it from Data Library > New dataset > Connectors and search for SendGrid. Project Admins create the connection; Project Editors can start datasets from a connection the project already has. Which connectors you can add depends on your plan.

What you can bring in from SendGrid

  • The email delivery tables the API key can read, and the columns you tick.
  • Data you ask for in the Chat, for example "which table has invoice due dates?"

The dataset can refresh daily or only when you ask.

Before you connect SendGrid

You need:

  • A SendGrid account.
  • A SendGrid API key with read access to the data you want to import.
  • If your SendGrid account restricts API access by IP, Mammoth's IP address on the allowed list. See Allow Mammoth through your firewall.

Create a restricted SendGrid API key

  1. In SendGrid, go to Settings → API Keys.
  2. Click Create API Key.
  3. Give it a name, for example Mammoth Integration.
  4. Under API Key Permissions, select Restricted Access.
  5. Grant read access to the data you want to import.
  6. Click Create & View and copy the API key. It won't be shown again.

Connect SendGrid to Mammoth

These steps follow the shared flow in Connect a database or app.

  1. Go to the Data Library and click New dataset.
  2. Choose Connectors.
  3. Search for SendGrid and click its tile. The connector workspace opens with the Chat showing.
  4. In the Chat, Mammoth shows a card that asks for the connection details. Fill in the fields below.
  5. Click Connect. Mammoth checks the API key and saves the connection. If the check fails, the card shows the error.
SendGrid New Connection form with API Secret and Name fields and a notice to whitelist Mammoth's IP address
FieldWhat to enter
API SecretYour SendGrid restricted API key (the form labels this field "API Secret")
NameA label for this connection (required)

A note on the card shows Mammoth's IP address and reminds you to whitelist it if your SendGrid account restricts API access by IP.

Pick SendGrid tables and columns

  1. In Tables, click a table to see its columns and sample rows.
  2. Tick the columns you want. They gather in Your table.
  3. Click Preview 100 rows to check the result.
SendGrid New Dataset dialog with the Alerts table selected, a SELECT query, data preview, and Save as dataset button

Save SendGrid data as a dataset

  1. Click Save as dataset.
  2. Enter a Dataset name and choose a folder under Save in.
  3. Choose Daily to refresh the dataset every day, or Manual to refresh it only when you ask.
  4. Click Save. When the dataset is ready, click Open dataset.

Refresh SendGrid data and choose an update method

Choosing Daily creates a Dataset Refresh automation for the dataset. To run it on another schedule, edit that automation. For a dataset saved with Manual, create a Dataset Refresh automation yourself.

After you save, the dataset's Update method setting offers these options:

Update methodWhat it does
Replace all dataRebuilds the dataset from the source on every refresh
Add new rows onlyKeeps your rows and adds rows above the last value of a Key column
Keep only the newest rowsEmpties the dataset, then brings in rows since the last refresh (needs a Key column)

A key column is a numeric or date column whose values only go up, such as an ID or a date.

Allow Mammoth's IP address in SendGrid

If your SendGrid account restricts API access by IP, add Mammoth's IP address, shown on the connection card, to the allowed list.

Troubleshoot SendGrid authentication

SymptomLikely causeFix
Entered api key is not valid, Please enter the valid api keySendGrid rejected the keyCopy the whole key again; keys are long strings
Data you expect is missingThe key's permissions don't cover itCheck the API key permissions include read access to that data
Connection is refusedIP access management blocks MammothAdd Mammoth's IP address to SendGrid's allowed list
Was this page helpful?

Something wrong? support@mammoth.io