Gravity Forms Brevo Add-On
A Gravity Forms add-on to sync form submissions to Brevo (formerly Sendinblue)
by Nuvol.cat · github.com/socenpauriba/gfaddon_brevo · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/socenpauriba/gfaddon_brevo/archive/refs/heads/main.zipWordPress plugin that integrates Gravity Forms with Brevo (formerly Sendinblue) to automatically sync contacts and subscriptions.
Description
This add-on allows you to connect Gravity Forms with your Brevo account. When a user submits a form, their data is automatically synced with Brevo and can be subscribed to specific lists.
The plugin dynamically fetches your Brevo contact attributes and lists via the API, so the field mapping always matches your actual Brevo account configuration.
Requirements
- WordPress 5.0 or higher
- Gravity Forms 1.9.16 or higher
- PHP 7.0 or higher
- Brevo account with API key (v3)
Installation
- Upload the
Brevo_CFaddonfolder to the/wp-content/plugins/directory - Activate the plugin from the WordPress 'Plugins' menu
- Go to Forms > Settings > Brevo to configure the connection
Configuration
1. Global Configuration
At Forms > Settings > Brevo, configure:
- API Key: Your Brevo API key (v3). Find it in Brevo under SMTP & API > API Keys.
2. Feed Configuration
For each form you want to connect with Brevo:
- Go to Forms > [Your Form] > Settings > Brevo
- Click Add New
- Configure:
- Feed Name: A descriptive name (ex: "Main Newsletter")
- Subscription Lists: Checkboxes with your Brevo lists (fetched automatically from API)
- Email: Select the form field containing the email address (required)
- Brevo Attributes: Add rows to map form fields to Brevo attributes. The dropdown shows all attributes from your Brevo account (FIRSTNAME, LASTNAME, SMS, LANGUAGE, etc.). You can also type custom attribute names.
- Condition (optional): Define conditions to control when information is sent
How It Works
Dynamic field mapping
The plugin connects to the Brevo API to fetch:
- Contact attributes (
GET /v3/contacts/attributes) — Populates the attribute dropdown with your actual Brevo fields - Contact lists (
GET /v3/contacts/lists) — Shows your lists as checkboxes instead of requiring manual ID entry
Results are cached for 5 minutes. The cache is automatically cleared when you update the API key.
Feed processing
Only email is a fixed required field. All other attributes are optional and added as rows by the user:
- Email is sent at the top level of the API request
- All mapped attributes go inside the
attributesobject - Selected lists go as numeric IDs in
listIds - Existing contacts are automatically updated (
updateEnabled: true)
Features
- Dynamic attribute mapping: Fetches your Brevo attributes via API — no hardcoded field names
- Dynamic list selection: Shows your Brevo lists as checkboxes
- Automatic sync: Contacts are sent when the form is submitted
- Flexible mapping: Map any form field to any Brevo attribute
- Custom attributes: Type any attribute name not in the dropdown
- Auto-update: Existing contacts are updated instead of duplicated
- Conditions: Define conditions to control when information is sent
- Delayed payment support: Compatible with Gravity Forms payments
- Error management: Logs errors and adds notes to entries
- Multi-language: Available in English, Catalan and Spanish
- Graceful fallback: If the API is unreachable, falls back to manual text input
API Functionality
The plugin uses these Brevo endpoints:
Contact creation/update
POST https://api.brevo.com/v3/contacts
{
"email": "user@example.com",
"listIds": [2, 5],
"updateEnabled": true,
"attributes": {
"FIRSTNAME": "John",
"LASTNAME": "Doe",
"LANGUAGE": "ENG"
}
}
Attribute discovery (admin UI)
GET https://api.brevo.com/v3/contacts/attributes
List discovery (admin UI)
GET https://api.brevo.com/v3/contacts/lists
Technical Notes
- Built on Gravity Forms
GFFeedAddOnframework - API requests via
wp_remote_request()/wp_remote_get() - Authentication via
api-keyheader - Attribute and list data cached as WordPress transients (5 min TTL)
- Cache auto-cleared on API key change
- Request timeout: 30 seconds (feed processing), 15 seconds (admin API calls)
- Success codes: 200, 201, 204
Supported Languages
- English (default)
- Catalan (
ca) - Spanish (
es_ES)
Adding New Translations
- Copy
languages/brevo-ca.po - Rename with language code (ex:
brevo-fr_FR.po) - Translate the texts
- Compile to .mo with Poedit
Project Structure
Brevo_CFaddon/
├── brevo.php # Main plugin file (bootstrap)
├── class-gfbrevoaddon.php # Main class with all the logic
├── css/
│ └── my_styles.css # Admin styles
├── js/
│ └── my_script.js # JavaScript scripts (reserved)
├── languages/
│ ├── brevo-ca.po # Catalan translation
│ └── brevo-es_ES.po # Spanish translation
└── README.md # Plugin documentation
License
GNU General Public License v2.0 or higher