WP Manifestindependent plugin directory
manifest / forms / gfaddon_brevo

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

★ 0stars
0forks

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.zip

WordPress 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

  1. Upload the Brevo_CFaddon folder to the /wp-content/plugins/ directory
  2. Activate the plugin from the WordPress 'Plugins' menu
  3. 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:

  1. Go to Forms > [Your Form] > Settings > Brevo
  2. Click Add New
  3. 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:

  1. Contact attributes (GET /v3/contacts/attributes) — Populates the attribute dropdown with your actual Brevo fields
  2. 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:

  1. Email is sent at the top level of the API request
  2. All mapped attributes go inside the attributes object
  3. Selected lists go as numeric IDs in listIds
  4. 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 GFFeedAddOn framework
  • API requests via wp_remote_request() / wp_remote_get()
  • Authentication via api-key header
  • 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

  1. Copy languages/brevo-ca.po
  2. Rename with language code (ex: brevo-fr_FR.po)
  3. Translate the texts
  4. 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