API Connector Documentation
Import Brevo (Sendinblue) Data to Google Sheets
In this guide, we’ll walk through how to pull data from the Brevo (previously Sendinblue) API directly into Google Sheets, using the API Connector add-on for Sheets.
Contents
- Before You Begin
- Part 1: Get Your Brevo API Key
- Part 2: Pull Brevo API Data into Sheets
- Part 3: Handle Pagination
- Part 4: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Get Your Brevo API Key
- Log in to Brevo and click SMTP&API in the drop-down account menu
- Your API key will be listed on the page. Keep it handy as you'll need it in a moment. That's it, you're now ready to use the Brevo API.
Part 2: Pull Brevo API Data into Sheets
For this example we'll fetch campaign stats. Enter in your own API key where it says your_api_key
.
- Open up Google Sheets and click Extensions > API Connector > Open > Create request.
- In the request form enter the following:
- Application:
Custom
- Method:
GET
- Request URL:
https://api.brevo.com/v3/emailCampaigns?statistics=globalStats&limit=100&excludeHtmlContent=true
- Headers
API-KEY
:your_api_key
- Application:
- Create a new tab and click Set current to use that tab as your data destination.
- Name your request and click Run. A moment later you’ll see data populate your sheet.
Part 3: Handle Pagination
By default, Brevo will usually return 50 records at a time. To get more, increase the limit
parameter. Different endpoints have different limits (e.g. /contacts has a max limit of 1000, while /emailCampaigns has a max of 100. The documentation for each endpoint shows the relevant limit).
To fetch more than the maximum number of records, use pagination handling:
- Pagination type:
offset-limit
- Offset parameter:
offset
- Limit parameter:
limit
- Limit value:
1000
(set this to the maximum value allowed by that endpoint)) - Run until:
choose when to stop fetching data
Part 4: API Documentation
Official API documentation: https://developers.brevo.com/reference/getting-started-1