🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Webhook Integration Add-on

Updated 10 min read Gravity Forms Automation & Webhooks
On this page
  1. Video walkthrough
  2. Step 1: Install and Activate Your License
  3. Step 2: Save Your Authentication Profiles
  4. Step 3: Create a Feed
  5. Step 4: Choose the Body
  6. Step 5: Save Values From the Response
  7. Step 6: Accept Callbacks
  8. Step 7: Import From an OpenAPI Document
  9. Step 8: Conditions, Retries and Failures
  10. Step 9: Follow Each Entry
  11. Step 10: Check an Entry Before It Is Saved (1.2.0)
  12. Example: members only
  13. When the check runs
  14. Limits and protection
  15. Updating From Version 1.0
  16. For Developers
  17. Limits of This Version
  18. Troubleshooting & FAQ
  19. The note says the request URL is not valid.
  20. The service answers 401 or 403.
  21. A response value is not saved.
  22. Can one form call several services?
  23. What happens when I uninstall the add-on?

Video walkthrough

Gravity Forms Webhooks: Send Entries to Any API (Auth, JSON, Save Response)
Webhooks in under 2 minutes: send entries to any API and save the response Watch on YouTube

The Gravity Forms Webhook Add-On sends your form entries to any webhook or REST API: CRMs, help desks, automation platforms, your own back end or a serverless function. Choose the method, build the body from your fields, add headers and saved authentication, save values from the response into the entry, accept callbacks, and let failed requests retry on their own.

This guide covers the settings, feeds, bodies, authentication, response mapping, callbacks, OpenAPI import, retries, the entry tools, updating from version 1.0 and troubleshooting.

System Requirements & Prerequisites

  • WordPress: Version 6.5 or higher
  • PHP: Version 7.4 or higher
  • Gravity Forms: Version 2.9 or higher
  • The receiving service: a public http:// or https:// address (requests to local or private network addresses are blocked)
  • GravityExtra license: The add-on installed, activated and licensed with an active GravityExtra license key

Step 1: Install and Activate Your License

  1. In WordPress go to Plugins → Add New → Upload Plugin, upload the add-on ZIP file and click Activate. If you already use the add-on, update it the same way or from the Plugins screen.
  2. Go to Forms → Settings → Webhook Add-On, enter your key in the Gravity Extra License section and click Activate License.
  3. Reload the page. The authentication profiles and the delivery settings appear.

Step 2: Save Your Authentication Profiles

Most APIs need a key or a token. Save it once in a profile and pick the profile in every feed that calls the same service. You can keep three profiles.

  • Bearer token: sends Authorization: Bearer <token>.
  • Basic: a username and a password, sent as Authorization: Basic.
  • API key in a header: for example a header named X-API-Key.
  • API key in the URL: a query parameter such as api_key.

Secrets are write-only: after saving, the field stays empty and shows A secret is saved. Leave this empty to keep it. They are never written to entry notes, logs or emails.

Authentication profile in the add-on settings: type Bearer token, profile name CRM API and a saved secret that is not shown
An authentication profile with a saved Bearer token.

Under Delivery, choose how many times a failed request is retried (0 to 3), the timeout, and the email address that receives the data when a request finally fails.

Delivery settings: 2 retries, a 15 second timeout and the email address for requests that finally fail
Retries, timeout and the failure email.

Step 3: Create a Feed

Open a form, go to Settings → Webhook Add-On and click Add New.

  • Feed name: shown in the feed list and in entry notes.
  • Method: GET, POST, PUT, PATCH or DELETE.
  • Request URL: the address of the webhook or API. Merge tags are allowed and URL-encoded, for example https://api.example.com/v1/companies/{Company:5}.
  • Authentication: one of your profiles, or None.
  • Headers: any extra header, with a form field or a custom value with merge tags.
Request section of a feed: POST to an API URL with the CRM API Bearer token profile and an X-Source header with a merge tag
A feed that creates a contact in a CRM.

Step 4: Choose the Body

  • All fields: every field as JSON, keyed by the admin label or the label; name and address fields become objects with their parts, checkboxes become lists, and the entry ID, form ID, date and page URL are added.
  • Selected fields: your own keys with a form field or a custom value. Send them as JSON (a dot in a key creates nested JSON, for example contact.email) or as a URL-encoded form.
  • Custom body: write the body yourself with merge tags, as JSON, form data, plain text or XML. Merge tag values are escaped for the chosen format, so quotes, ampersands and line breaks in answers never break your JSON or XML.
  • No body: for simple pings and DELETE requests.

With GET and DELETE, the fields of All fields or Selected fields are added to the URL as query parameters.

Body section with a custom JSON body built from merge tags, including the callback URL merge tag
A custom JSON body with merge tags.

Step 5: Save Values From the Response

Many APIs answer with the record they created. Under Save response values, enter a path in the JSON response and pick the entry field to save it in: data.id, items.0.name or status. The values are saved before notifications and confirmations are sent, so you can use them there, for example to email your team a link to the new CRM record.

Tick Add the response body to the entry note to keep a copy of each answer on the entry.

Step 6: Accept Callbacks

Some services finish their work later: a document is signed, a payment is reviewed, an application is scored. Tick Accept a callback from the service and send the merge tag {api_callback_url} in the URL, a header or the body. It becomes a signed address for this entry and feed, valid for 7 days. When the service posts JSON or form data to it, the values listed under Save callback values are written to the entry and a note is added. A changed or expired address is refused.

Response section: data.id from the response saved to the CRM ID field, response in the entry note, callback values saved to the Status field
Response and callback values saved to entry fields.

Step 7: Import From an OpenAPI Document

If the service publishes an OpenAPI 3 or Swagger 2 document, click Import an operation, paste the JSON document and click Read operations. Choose an operation and click Use this operation: the method, the full URL and an example JSON body built from the schema are filled in. Replace the values in curly braces with merge tags and save the feed.

Import from OpenAPI: a pasted API document, the operation POST /contacts selected and the method and URL filled in
Choosing an operation from an API document.

Step 8: Conditions, Retries and Failures

  • Conditions: under Conditions, send the request only when the entry matches your rules.
  • Retries: when the service cannot be reached, answers 429 (too many requests) or a 5xx server error, the request is sent again in the background after 1, 2 and 3 minutes, up to the number of retries you chose. Other errors, such as 400 or 422, are not retried because sending the same data again would fail again.
  • Final failure: the entry gets a note with the status and the answer, and the data that was sent is emailed to the address in Delivery. Headers and credentials are left out of the email.

Step 9: Follow Each Entry

Every request adds a note to the entry with the feed name, the method, the address (without query parameters) and the status. The Webhooks box on the entry shows the last result of each feed and when a callback arrived. Send again sends a feed once more for that entry, for example after you fixed a mapping or the service was down for longer than the retries.

Entry notes: request sent with status 201 and the response, a second webhook sent, and the callback received
Notes for two webhooks and a callback.
Webhooks box on an entry with the result of each feed, the callback time and Send again buttons
The Webhooks box with Send again.

Step 10: Check an Entry Before It Is Saved (1.2.0)

Some services should decide whether a submission is accepted: a member number that must exist, a coupon that must still be valid, a booking slot that must still be free. From version 1.2.0 a feed can send its request while Gravity Forms checks the form, wait for the answer and refuse the submission with a message when the answer says no. Nothing is saved until the service agrees.

Open the feed and go to the Check Before Saving section. Tick Check the response before the entry is saved. The request uses the URL, method, headers, authentication profile and body that the feed already has, so nothing else needs to change.

  • Wait at most (seconds): from 1 to 15 seconds, 5 by default. The visitor waits on the submit button while the service answers, so keep it short.
  • Valid status codes: the answers that mean “accepted”, for example 2xx or 200, 201. Any other status below 500 refuses the submission.
  • Also require (JSON path) and to equal: optional. For example valid and true accepts only an answer such as {"valid": true}. Use dots for nested values, such as result.status.
  • Error message from the answer (JSON path): optional, for example message or error.text. The text found there is shown to the visitor as plain text, at most 300 characters. Markup in it is shown as text and never runs.
  • Message when the answer is not valid: shown when the answer has no message of its own.
  • Show the message on: a field of the form, or above the form. When the field is hidden by conditional logic, the message moves above the form.
  • When the service cannot be reached: a timeout, a network error, a 5xx answer, or an answer that is not readable JSON while a JSON value is required. Choose Refuse the submission with a message (the default) or Let the entry through and add a note.
  • Also send after save: off by default, so the check is the only request of the feed. Tick it when the service also needs the saved entry, for example to receive the entry ID.
Check Before Saving section of a webhook feed: wait at most 7 seconds, valid status codes 2xx, JSON value valid equal to true, message from the answer, shown on the Member number field
The Check Before Saving settings of a feed.

Example: members only

A workshop form asks for a member number. The feed posts the number to your member API with a Bearer token, requires valid to equal true and reads the error text from message, shown on the Member number field. A visitor who types a number that does not exist sees the text of your API under the field and can correct it. A correct number is accepted, the entry is saved and gets the note “checked the entry before it was saved”, and response values you map are saved to the entry as usual.

A booking form refused before saving: the message from the member service is shown under the Member number field
The answer of the service, shown under the field.

When the check runs

  • Only when the feed is active and its condition matches the answers.
  • Not for spam, and not when the form already has errors of its own, such as an empty required field.
  • On multi-page forms, when the form is submitted on the last page (default), or, if you choose When leaving the page of the field above, when the visitor leaves the page that holds that field. An accepted answer is reused on the last page as long as the same data would be sent.
  • With AJAX forms and normal forms alike, and for submissions made through the Gravity Forms REST API.
  • The {api_callback_url} merge tag is empty in this request, because the entry does not exist yet.

Limits and protection

  • Each visitor IP address can trigger at most 30 checks in 10 minutes, so the form cannot be used to flood your service. Further submissions are refused with a “too many attempts” message and no request is sent. Developers can change this with the gfwh_validation_rate_limit and gfwh_validation_rate_window filters.
  • At most 64 KB of the answer is read. A longer answer can still be judged by its status code, but a JSON value cannot be read from it.
  • Without an active license the check is skipped, the form works as before, and an admin notice says so.
  • The Gravity Forms log shows each check with the status and the time it took. Authorization and key headers are shown as ***.

Updating From Version 1.0

Feeds created with version 1.0 keep all their settings. After the update and the license activation they send a POST request to their Webhook/Endpoint URL: the saved Message/Body as JSON when it is valid JSON, otherwise as plain text, or all fields as JSON when the body is empty. Open a feed and save it to use the new options.

For Developers

  • gfwh_request filter: change the URL, method, headers or body of a request before it is sent.
  • gfwh_allow_local_urls filter: return true to allow addresses on your own network (blocked by default).
  • gfwh_callback_received action: runs after a callback was accepted, with the entry, the feed and the data.

Limits of This Version

  • File uploads are sent as their URLs, not as multipart file uploads.
  • Authentication flows that need a browser login (OAuth authorisation screens) are not included; use a token or key from the service.
  • Response values are read from JSON responses.
  • OpenAPI import reads JSON documents; convert YAML documents to JSON first.

Troubleshooting & FAQ

The note says the request URL is not valid.

Check that the URL starts with http:// or https:// and that merge tags in it have values. An address on your own network is blocked unless a developer allows it with the gfwh_allow_local_urls filter.

The service answers 401 or 403.

Pick the right authentication profile in the feed and check the token or key in the profile. Save a new secret to replace the old one.

A response value is not saved.

The path must match the JSON response exactly, including capital letters. Tick Add the response body to the entry note to see the answer, then copy the path from it.

Can one form call several services?

Yes. Add one feed per request. Each feed has its own method, body, authentication, response values and condition.

What happens when I uninstall the add-on?

Forms → Settings → Uninstall removes the settings, the feeds and the scheduled retries. Data already sent to other services stays there.

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr