DEV Community

Federico
Federico

Posted on

From Google Sheets to WhatsApp and Monday.com: Building a WordPress Plugin That Connects Elementor Forms to an Automated Webhook Pipeline

The Problem

Our company uses Monday.com as our CRM. We also rely heavily on Elementor Pro forms on our WordPress site to collect leads, registrations, and inquiries. The issue? Data lived in two separate worlds — form submissions landed in Google Sheets, and there was no automated way to push them into our CRM or notify our team in real time.

Operators had to manually copy data from Google Sheets into Monday.com and then separately reach out to leads via phone or WhatsApp. It was slow, error-prone, and wasted hours every week.

We needed a bridge.

The Infrastructure

The solution relies on four components working together:

WordPress Plugin Settings

  • WordPress + Elementor Pro — Forms are built visually with Elementor. The plugin hooks into Elementor's submission lifecycle to capture data before it hits any other handler.
  • Custom WordPress Plugin — Developed from scratch. It intercepts form submissions, prepares the payload, and fires a POST request to an n8n webhook.
  • n8n (self-hosted via Docker) — Deployed on a private server. It receives the webhook, processes the data, and routes it through different branches based on the form configuration. n8n acts as the orchestration layer.
  • OpenWA (self-hosted via Docker) — An open-source WhatsApp API gateway deployed as a separate Docker container. n8n talks to OpenWA's HTTP API to send templated messages automatically to the phone number submitted in the form.

n8n Workflow

Every piece of the pipeline is self-hosted. No third-party SaaS for the automation layer, no reliance on external WhatsApp business APIs — everything runs on our own infrastructure.

How the Plugin Works

Phase 1: Google Sheets Only

The plugin started simple. When an Elementor form was submitted, the plugin would:

  1. Hook into elementor_pro/forms/new_record
  2. Extract the form fields and their values
  3. Append a row to a Google Sheet via the Google Sheets API

This worked fine for a while. But soon the team needed more.

Phase 2: Adding WhatsApp Notifications

We added an n8n webhook step. Now, on submission, the plugin fires a POST request to an n8n workflow endpoint. The workflow:

  1. Receives the form data (name, email, phone, message, etc.)
  2. Calls OpenWA's REST API with the recipient's phone number and a pre-built message template
  3. OpenWA delivers the message via WhatsApp automatically

The beauty of this is that any Elementor form with a phone field can trigger a WhatsApp notification — no extra configuration needed beyond setting up the workflow once in n8n.

// Simplified example of the plugin's webhook call
add_action('elementor_pro/forms/new_record', function ($record, $handler) {
    $form_data = $record->get('fields');
    $webhook_url = get_option('n8n_webhook_url');

    wp_remote_post($webhook_url, [
        'body' => json_encode([
            'form_id' => $record->get_form_settings('id'),
            'fields'  => $form_data,
            'actions' => ['whatsapp', 'monday'], // configured per form
        ]),
        'headers' => ['Content-Type' => 'application/json'],
    ]);
}, 10, 2);
Enter fullscreen mode Exit fullscreen mode

Phase 3: Adding Monday.com Integration

This was the most complex part. The requirement was: when a form is submitted, create or update an item in a specific Monday.com board, mapping form fields to board columns.

The challenge? Monday.com boards can have dynamic columns, and the target board might not have the exact columns we needed. So the plugin's n8n workflow implements a self-healing column mapping:

  1. Check if the group exists — If not, create a new group on the board
  2. Check if the required columns exist — Iterate over the form fields and, for each one, verify a matching column exists on the Monday.com board
  3. Create missing columns — If a column doesn't exist, create it with the appropriate type (text, date, phone, email, etc.)
  4. Map form fields to columns — Build a column values payload matching the form data to the board columns
  5. Create the item — Insert the item with all mapped values

This process was completely automated with n8n nodes using monday pre-built blocks

Why I Kept the Excel-Like Logic in the Plugin

You might wonder: shouldn't the column mapping logic live in n8n instead of the WordPress plugin?

Ideally, yes. But there's a practical reason it stayed in the plugin. The original Google Sheets implementation already had a robust field-to-column mapping system baked in. When we added Monday.com, it was faster and safer to reuse that same mapping logic in the plugin rather than duplicating it in n8n.

The plugin sends the already-structured payload to n8n, which acts more as a router and action executor — it doesn't need to understand the form structure. This keeps the n8n workflows simpler and more generic: they just receive a well-defined JSON object and act on it.

Could the logic be moved to n8n? Absolutely. But unless there's a compelling reason (like supporting multiple sites with different plugins), the current approach works well and keeps complexity centralized in one place.

The Full Flow

Here's the complete lifecycle of a form submission:

User submits Elementor form
        │
        ▼
WordPress plugin hooks into elementor_pro/forms/new_record
        │
        ├──► Google Sheets (append row — original behavior)
        │
        └──► POST to n8n webhook
                  │
                  ├──► Branch: WhatsApp
                  │         └──► OpenWA API → WhatsApp message to lead
                  │
                  └──► Branch: Monday.com
                            ├──► Check/create group
                            ├──► Check/create columns
                            └──► Create item with mapped values
Enter fullscreen mode Exit fullscreen mode

Each form in Elementor can be configured to enable WhatsApp notifications, Monday.com sync, or both — all from a simple settings panel in the plugin.

What I Learned

Self-hosted automation is liberating. Running n8n and OpenWA on our own Docker infrastructure means no per-message fees, no rate limits imposed by a third party, and full control over the data pipeline.

Bridge technologies are the real heroes. WordPress doesn't need to know about Monday.com's GraphQL API. OpenWA doesn't need to know about Elementor forms. n8n sits in the middle and translates between all of them, and the plugin just speaks one language: HTTP.

Start simple, then expand. The Google Sheets integration was built in a day and delivered immediate value. WhatsApp and Monday.com came later, each adding a layer of automation that compounded the ROI. If we had tried to build the whole thing at once, we'd probably still be designing it.

Future Improvements

  • Move the column mapping logic to n8n for multi-site support
  • Add two-way sync — when an item updates in Monday.com, notify the WordPress user
  • Template-based messages — let admins edit WhatsApp message templates from the WordPress admin panel
  • Error handling dashboard — log failed webhook calls and retry with a queue system

Built with WordPress, Elementor Pro, n8n, OpenWA, and Monday.com — all glued together by a custom plugin and a lot of JSON.

Top comments (0)