Skip to main content

Gravity Forms

Gravity Forms is a forms plugin for WordPress. Its Webhooks Add-On sends every entry of a form to an address, with the fields you choose. Pointed at the Flows address, it starts your flows: a request from the site gets an answer in Viber or SMS within seconds.

Written from Gravity Forms documentation

This page is written from the public documentation of Gravity Forms and has not been checked on a live account yet.

What you need​

  • The Webhooks Add-On. It comes with the Gravity Forms Elite license — the help page of the add-on does not name the license, so this is not confirmed by the documentation.
  • One address for all forms. A form can have several webhooks.
  • You choose the keys of the request yourself: AlphaFlow reads phone, email, name, form_id, entry_id, form and event. In the cabinet Gravity Forms is connected as a Website form — the same connection that takes Wix and WPForms, see Website forms.

Step 1. Create a connection​

  1. Open Flows → Connections, press Connect a system and choose Website form.
  2. Press Copy address. It looks like https://events.alphasms.net/hooks/<TOKEN> — keep it secret.

Step 2. Set up the form in Gravity Forms​

  1. Install and activate the Webhooks Add-On.
  2. Open Forms, the form, Settings → Webhooks and press Add New.
  3. Name — "AlphaFlow".
  4. Request URL — the address from the cabinet.
  5. Request Method — POST.
  6. Request Format — JSON.
  7. Request Headers — not needed.
  8. Request Body — Select Fields, and in Field Values add the pairs: the key phone with the phone field, email with the email field, name with the name field. Add form_id and entry_id with the Form ID and the Entry ID of the entry, if the list offers them — this is not confirmed by the documentation.
  9. Webhook Condition — if you need it. Press Save Settings.

Name the keys exactly like this: AlphaFlow looks for the phone under the key phone. The request then looks like this:

{ "phone": "<Phone field>", "email": "<Email field>", "name": "<Name field>", "form_id": "<Form ID>", "entry_id": "<Entry ID>" }
  • Do not choose All Fields: it sends the fields under their numeric ids (1, 2.3), and AlphaFlow cannot tell which of them is the phone.
  • To send another event than form_submitted, add a hidden field to the form with the name of the event, for example lead_submitted, and the key event with this field (see Events).

Step 3. Send a test​

Send the form on the site with your own phone number. The event appears in Flows → Connections → Event journal within seconds, and the connection shows Recognised: Website form.

Events​

Gravity FormsAlphaFlow eventProperties
A form entry without the key eventform_submittedform_id, entry_id, form
A form entry with event = lead_submitted, order_created, order_paid or appointment_scheduledthe same nameform_id, entry_id, form

Put order_paid into event only on a form whose entry means a completed payment; a form that only places an order uses order_created: otherwise an unpaid order reaches the customer as "paid".

  • form_id and entry_id come if you added them; form — if you added a key form with the name of the form.
  • Any other value of event gives form_submitted; other names are set in the connection.

The contact is found by the keys phone and email; the name comes from name. The time of the event is the time it was received. The names of the events are the ones the ready-made templates expect — see Recommended events.

Good to know​

  • The Gravity Forms help does not describe repeats of a webhook. AlphaFlow tells requests apart by their content: an identical request within 10 minutes is not recorded twice. With entry_id every entry differs, so two entries with the same fields remain two events; without it they become one if they come within 10 minutes.
  • The Request URL must pass the address check of WordPress: a redirect to an address it cannot check, or a non-standard port, stops the sending.
  • The add-on neither signs the request nor has a secret: the secret in the address is enough.
  • The address always answers 200. Above the daily event limit the event is refused in AlphaFlow with quota_exceeded and shown in the journal; the webhook in Gravity Forms stays on.

Gravity Forms documentation​