hotchand / cf7-agencyzoom
Sends Contact Form 7 submissions to AgencyZoom CRM via their native Webhook Lead Integration (with optional Zapier routing).
Package info
github.com/Hotchand/Wordpress-Contact-Form-7-sync-with-AgencyZoom-CRM
Type:wordpress-plugin
pkg:composer/hotchand/cf7-agencyzoom
Requires
- php: >=7.4
Requires (Dev)
This package is auto-updated.
Last update: 2026-08-11 14:22:00 UTC
README
Version: 4.0.0 Requires: WordPress + Contact Form 7 License: GPL-2.0+
Sends Contact Form 7 submissions straight into your AgencyZoom CRM as new leads, using AgencyZoom's native Webhook Lead Integration. Optionally routes the same data through Zapier instead (or in addition), so you can use Zapier's own AgencyZoom action/filters/multi-step workflows.
How it works
- A visitor submits a Contact Form 7 form and CF7 successfully sends its notification email.
- The plugin hooks into
wpcf7_mail_sent(fires only for valid, non-spam submissions). - It builds a JSON payload from the submitted fields, auto-mapping recognizable CF7 field names to AgencyZoom's expected lead fields.
- The payload is POSTed to your configured AgencyZoom webhook URL (and/or your Zapier Catch Hook URL).
- Every attempt — success, error, or skipped — is written to a log you can review in the admin UI.
No lead is created if CF7's own validation/spam filtering rejects the submission, since the hook only fires after a successful send.
Features
- Direct AgencyZoom webhook integration — no third-party middleman required
- Optional Zapier routing — send to Zapier's Catch Hook instead of (or alongside) AgencyZoom, useful if you want Zapier's filters/multi-app workflows before the lead hits AgencyZoom
- Automatic field detection — recognizes common CF7 field names (
your-name,your-email,your-phone,your-message, and many variants) and maps them to the correct AgencyZoom field with no configuration - Manual field mapping — override auto-detection per CF7 field name → AgencyZoom field, from the admin UI
- Per-form webhook overrides — route individual forms to different AgencyZoom pipelines (e.g. Auto leads vs. Home leads) instead of one global URL
- Unmapped fields fall back to Notes — nothing submitted is silently dropped
- Field Detection preview tab — see exactly how every field on every CF7 form on the site will be mapped, before anything is submitted
- Built-in test sender — fire a sample test lead at AgencyZoom or Zapier directly from the settings screen
- Submission log — custom DB table recording timestamp, source form, result, HTTP code, AgencyZoom's response, and the full payload sent, with a one-click "repair" button if the log table is ever missing
- Developer hooks —
cf7az_before_send,cf7az_payload,cf7az_sent,cf7az_failedfilters/actions for custom logic
Installation
- Upload the plugin to
/wp-content/plugins/cf7-agencyzoom/(or install the zip via Plugins → Add New → Upload Plugin). - Activate the plugin. This creates the log table (
cf7az_v4_logs) automatically. - Make sure Contact Form 7 is installed and active — the plugin will show an admin notice and stay dormant otherwise.
- Go to Settings → CF7 AgencyZoom to configure.
Configuration
1. Webhook tab
- Active Endpoint — choose where submissions go:
AgencyZoom Direct,Zapier Only, orBoth. - AgencyZoom Webhook URL — get this from AgencyZoom: Settings → Web Lead Integration → Add Integration → Webhook, then paste the URL here.
- Zapier Catch Hook URL (optional) — from a Zap using the "Webhooks by Zapier" → Catch Hook trigger. Add an AgencyZoom → Create Lead action afterward and map the incoming fields.
- Send Test to AgencyZoom / Zapier — fires a sample payload immediately and logs the result so you can confirm the connection before going live.
- Logging — toggle whether real (non-test) submissions get written to the Logs tab.
2. Field Detection tab
Read-only, fully automatic preview of every CF7 form on the site: which fields it found, their type, whether required, and which AgencyZoom field (if any) each one maps to. Unmapped fields are flagged as "appended to notes."
3. Forms tab
Set a per-form webhook URL override so a specific form posts to a different AgencyZoom pipeline than the global default. Leave blank to use the global webhook.
4. Field Mapping tab
Manually pair CF7 field names to AgencyZoom fields (overrides auto-detection). Defaults to common CF7 field names (your-name, your-email, your-phone, your-message) if nothing is set yet.
5. Logs tab
Every submission/test attempt with timestamp, source (form ID or TEST), result (✅ sent / ⏭ skipped / ❌ error), HTTP status, AgencyZoom's response, any WP error, and the exact JSON payload sent (expandable). Includes a "Clear All" action and a diagnostic bar that can recreate the log table if it's missing.
Supported AgencyZoom fields
| Category | Fields |
|---|---|
| Contact | First Name, Last Name, Email, Other Email, Phone, Other Phone, Birthday |
| Business | Business Name, Contact Name |
| Address | Street Address, Street Address Line 2, City, State, ZIP, Country |
| Property | Property Address 1/2, Property City, Property State, Property ZIP, Property Country |
| Insurance | Current Carrier, Current Premium, Expiration Date, Marital Status |
| Other | Notes / Message |
Auto-detection recognizes a wide range of common CF7 field-name variants for each of these (e.g. phone, tel, mobile, cell, contact-number all map to Phone). Anything that doesn't match a known field is appended to Notes, labeled with its original field name, so no submitted data is lost.
If only one name field is submitted (e.g. your-name → First Name), the plugin automatically splits it into First Name / Last Name on the first space.
Developer hooks
// Cancel or modify the payload before it's sent add_filter( 'cf7az_before_send', function ( $payload, $form_id ) { return $payload; // return false to cancel sending }, 10, 2 ); // Modify the final payload (runs inside build_payload) add_filter( 'cf7az_payload', function ( $payload, $submission ) { return $payload; }, 10, 2 ); // React to a successful send add_action( 'cf7az_sent', function ( $form_id, $payload ) { /* ... */ }, 10, 2 ); // React to a failed send add_action( 'cf7az_failed', function ( $wp_error, $form_id, $payload ) { /* ... */ }, 10, 3 );
Troubleshooting
- No leads arriving in AgencyZoom — check the Logs tab first. A "Skipped" entry usually means no webhook URL is configured (global or per-form); an "Error" entry shows AgencyZoom's HTTP response.
- Log table missing — the Logs tab shows a diagnostic bar with a "Create Table Now" button if the DB table wasn't created on activation (e.g. after a manual file update without reactivating).
- A field isn't mapping correctly — check the Field Detection tab to see the auto-detected mapping, then add a manual override in Field Mapping if needed.
- Fields ending up in Notes unexpectedly — that field name wasn't recognized by auto-detection; add it explicitly under Field Mapping.
File structure
cf7-agencyzoom/
├── cf7-agencyzoom.php # Plugin bootstrap
├── includes/
│ ├── class-cf7az-handler.php # Hooks into wpcf7_mail_sent, dispatches to AZ/Zapier
│ ├── class-cf7az-sender.php # Field auto-detection, payload building, HTTP POST
│ ├── class-cf7az-settings.php # Admin settings page (tabs, AJAX test/clear handlers)
│ └── class-cf7az-logger.php # Submission log DB table
└── assets/ # Admin CSS/JS