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
- In SendGrid, go to Settings → API Keys.
- Click Create API Key.
- Give it a name, for example
Mammoth Integration. - Under API Key Permissions, select Restricted Access.
- Grant read access to the data you want to import.
- 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.
- Go to the Data Library and click New dataset.
- Choose Connectors.
- Search for SendGrid and click its tile. The connector workspace opens with the Chat showing.
- In the Chat, Mammoth shows a card that asks for the connection details. Fill in the fields below.
- Click Connect. Mammoth checks the API key and saves the connection. If the check fails, the card shows the error.
| Field | What to enter |
|---|---|
| API Secret | Your SendGrid restricted API key (the form labels this field "API Secret") |
| Name | A 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
- In Tables, click a table to see its columns and sample rows.
- Tick the columns you want. They gather in Your table.
- Click Preview 100 rows to check the result.
Save SendGrid data as a dataset
- Click Save as dataset.
- Enter a Dataset name and choose a folder under Save in.
- Choose Daily to refresh the dataset every day, or Manual to refresh it only when you ask.
- 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 method | What it does |
|---|---|
| Replace all data | Rebuilds the dataset from the source on every refresh |
| Add new rows only | Keeps your rows and adds rows above the last value of a Key column |
| Keep only the newest rows | Empties 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
| Symptom | Likely cause | Fix |
|---|---|---|
Entered api key is not valid, Please enter the valid api key | SendGrid rejected the key | Copy the whole key again; keys are long strings |
| Data you expect is missing | The key's permissions don't cover it | Check the API key permissions include read access to that data |
| Connection is refused | IP access management blocks Mammoth | Add Mammoth's IP address to SendGrid's allowed list |
Related
- Connect a database or app: the shared connector workspace steps.
- Allow Mammoth through your firewall: the IP address to allow.
- Manage saved connections: edit the connection when you rotate the key.
- Refresh a dataset: change when the dataset refreshes.
- Mailchimp: import audience and campaign data.
Something wrong? support@mammoth.io