How to connect WordPress forms to a CRM
Connect your WordPress form to the CRM with its official integration, a webhook or an API request. The manual route works when your form plugin exposes hooks or webhooks, but field mapping, authentication and failed submissions need careful handling.
- 01List the data to send
- 02Prepare the form and CRM
- 03Choose a connection method
- 04Configure the manual route
- 05Map and secure the request
- 06Submit and inspect test leads
- 07Use the faster connector route
What you need
- A WordPress form plugin with webhook, addon or hook support
- Admin access to WordPress
- CRM administrator access and API credentials
- A test email address
List the data to send
Write down the fields your CRM needs before changing the form. Usually this includes email, first name, last name, phone, company, message, consent status and the page or campaign that produced the lead.
Check the CRM property names and allowed values. A form field labelled Industry may need to send the CRM's internal value rather than the visible label. Decide whether an existing contact should be updated when the email address already exists.
Prepare the form and CRM
Add every required field to the WordPress form, then create matching custom properties in the CRM where necessary. Keep email as a required field if the CRM uses it to identify contacts.
Do not send passwords, payment details or other unnecessary personal data. Add a clear consent checkbox if you will use the lead for marketing, and make sure the CRM has somewhere to store that consent.
Choose a connection method
Use the CRM's official WordPress integration or an automation service when one supports your form plugin. If your form plugin can send webhooks, point it at the CRM endpoint or an automation workflow. A webhook is an HTTP request sent when the form is submitted; Gravity Forms documents POST requests, JSON or form data, custom headers, selected fields and conditional feed logic for this purpose.
If neither option exists, you need custom code or a connector plugin. WordPress itself does not know how to translate every form plugin's entry into every CRM's API.
Configure the manual route
For Gravity Forms, install and enable its Webhooks Add-On, open the form editor, then go to Form Settings → Webhooks and create a feed. Enter the CRM or automation webhook URL, normally use POST, choose JSON when the receiving API expects JSON, add authentication headers if required, and map only the fields you need. Add feed conditions when only some submissions should become CRM leads.
For a custom integration, use the form plugin's documented submission hook and send the request server-side with WordPress's HTTP API. Gravity Forms documents gform_after_submission for sending entry data to a third party and wp_remote_post() is WordPress's built-in POST request function. Store tokens outside the form's front-end JavaScript.
The drawback is maintenance: a renamed form field, changed CRM property, expired token or API validation rule can stop lead capture without making the form itself look broken.
Map and secure the request
Map each WordPress field to the CRM's internal property name, not just the label shown in the form builder. Send a single, normalised value for dropdowns and checkboxes, and convert phone numbers and dates to the format the CRM accepts.
Use HTTPS and a server-side secret or signed webhook where supported. If you send data to HubSpot's Forms API, the submission must use the portal ID and form ID, and fields must satisfy the form definition and validation rules. HubSpot provides an unauthenticated submission endpoint for ordinary form data and a secure variation for sensitive data.
Submit and inspect test leads
Submit the form with a new test email, then check the CRM record, field values, list membership, owner assignment and any workflow activity. Repeat with an existing email to confirm whether the CRM updates the contact or creates a duplicate.
Test blank optional fields, special characters, phone numbers, consent unchecked, conditional fields and spam-protection failures. Check the WordPress form entry and the CRM's integration or API log. The common Friday failure is a successful-looking form submission followed by a rejected API request because a property name, required field or option value no longer matches.
Use the faster connector route
If the form is built with Gravity Forms and the destination is HubSpot, the Gravity Forms HubSpot Addon is the quicker route. It is designed to map submissions to HubSpot properties, apply conditional logic and send leads without maintaining the API request yourself.
Install the addon through WordPress, activate it, connect the HubSpot account in the Gravity Forms settings, select the form, create the HubSpot feed and map the fields. Still run the same duplicate, consent and failure tests before sending live traffic.
Let Gravity Forms HubSpot Addon do it
Maps form submissions to HubSpot properties with conditional logic; choose it for automated CRM lead capture from Gravity Forms.
Sources
- docs.gravityforms.com /triggering-webhooks-form-submissions/?utm_source=openai
- docs.gravityforms.com /gform_after_submission/?utm_source=openai
- developers.hubspot.com /docs/api-reference/legacy/marketing/forms/v3-legacy/submit-…
- developer.wordpress.org /rest-api/using-the-rest-api/authentication/?utm_source=open…
Questions
- Can WordPress connect forms to any CRM?
- WordPress can connect to most CRMs, but the form plugin must provide an integration, webhook, export mechanism or submission hook. You then need the CRM's API or an automation service to accept the data. If neither side provides a usable interface, a custom connector is required. The connection is not a native WordPress feature that can be switched on for every form plugin.
- Do I need a plugin to connect a WordPress form to a CRM?
- You need a plugin, addon or custom code unless the CRM form is embedded directly on the page. A connector addon is usually the simplest option because it handles authentication, field mapping and submission events. The manual route is practical when your existing form plugin already supports webhooks or documented hooks, but custom code becomes your responsibility to secure and maintain.
- Why are form submissions reaching the CRM with empty fields?
- Empty CRM fields usually mean the request uses the wrong internal property name, the form field ID changed, or the CRM expects a different value format. Dropdowns and checkboxes are frequent causes because the visible label may not be the value accepted by the CRM. Compare one captured request with the CRM property schema, then test a new submission rather than editing an old record.
- How do I stop duplicate CRM contacts?
- Use the visitor's email address as the CRM matching field and configure the integration to update an existing contact where the CRM supports that behaviour. Do not rely on the contact's name, because names are not unique. Also check whether retries or double-clicks create a second request; use an entry ID or external reference when the CRM and connector support idempotency.
- Is it safe to send CRM API keys from a WordPress form?
- Do not place a private CRM API key in browser JavaScript or hidden form fields, because visitors can inspect them. Send credentials from a server-side webhook, connector or custom WordPress request, and use HTTPS. WordPress Application Passwords are intended for programmatic API authentication rather than interactive logins, while CRM tokens should be limited to the permissions the integration needs.