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

Gravity Forms Chatwoot Premium Add-on Setup Guide

Updated 9 min read Gravity Forms Integrations A–Z
On this page
  1. Video walkthrough
  2. What you need
  3. Find your account id, access token and inbox id
  4. The settings page
  5. Keeping the token out of the database
  6. Create a feed
  7. The contact
  8. The conversation
  9. What happens on submit
  10. Retries never create duplicates
  11. Errors and troubleshooting
  12. Privacy and security
  13. For developers
  14. Frequently asked questions
  15. Does it work with Chatwoot Cloud and self-hosted Chatwoot?
  16. Will the contact receive an email?
  17. Can I only create contacts?

Video walkthrough

Gravity Forms Chatwoot Add-On Setup Guide: Contacts & Conversations (WordPress Side)
Video setup guide: Gravity Forms Chatwoot Watch on YouTube

The Gravity Forms Chatwoot Premium Add-on connects your WordPress forms to Chatwoot, the open-source customer support and live chat platform. When someone sends a form, the add-on creates or updates a Chatwoot contact from the answers (email, name, phone and any custom attributes you map) and can open a conversation in the inbox you choose, with the form message, labels, an agent and a team. Your team then answers the request in Chatwoot next to every chat, email and message from the same person.

It works with Chatwoot Cloud and with a self-hosted Chatwoot on your own server. You enter the address of your Chatwoot, your account id and the access token from your Chatwoot profile; the token is stored encrypted, and the add-on only ever contacts the Chatwoot address you set. This guide walks through the setup, every feed option, and what happens when something goes wrong.

What you need

  • WordPress with Gravity Forms 2.9 or newer.
  • PHP 7.4 or newer.
  • An active license key for this add-on.
  • A Chatwoot account, on Chatwoot Cloud or self-hosted, and a user who can see the inbox you want to use (an agent or an administrator).

If Gravity Forms is missing or older than 2.9, the add-on shows a notice in the WordPress admin and does nothing else, so a form is never left half connected.

Find your account id, access token and inbox id

Three values connect the add-on to Chatwoot. All three are on screens you already have.

  1. Account id. Log in to Chatwoot and look at the address bar. It reads like /app/accounts/1/dashboard; the number after /app/accounts/ is your account id.
  2. Access token. Click your avatar, open Profile Settings and scroll to the Access Token box at the bottom. Copy the token. It acts with the permissions of that user, so use a user who can see the inbox you plan to use, and treat the token like a password.
  3. Inbox id. Open Settings → Inboxes and click the inbox that should receive form conversations. The number at the end of the address is its id. You do not have to look it up by hand: the Test connection button lists every inbox with its id.

Any inbox type can hold contacts. For conversations, an API inbox, a website inbox or an email inbox all work well; an API inbox is a good choice if you want form conversations kept apart from live chat.

The settings page

Install and activate the add-on like any plugin, after Gravity Forms. Then open Forms → Settings → Chatwoot. Activate your license key first; the connection fields appear once the license is valid.

The Chatwoot settings page in Gravity Forms: license key, Chatwoot address, account id, access token, default inbox id and a Test connection button
The settings page: Chatwoot address, account id, access token, default inbox and the Test connection button.
  • Chatwoot address: https://app.chatwoot.com for Chatwoot Cloud, or the address of your own Chatwoot, such as https://chat.yourcompany.com. A Chatwoot under a sub-folder or on its own port also works. Only https addresses are accepted.
  • Account ID: the number from the dashboard address.
  • Access token: pasted once and encrypted before it is saved. The field never shows it again.
  • Default inbox ID: the inbox used by any feed that leaves its own inbox empty.

Click Test connection. The add-on asks Chatwoot for the inboxes of the account and shows them with their ids, for example Website chat (#1), Support email (#3). If you typed a default inbox, it confirms that inbox exists in the account. A wrong token, a wrong account id or an address that cannot be reached shows Chatwoot’s own error message, with the token removed from it. Save the settings when the test is green.

Keeping the token out of the database

If you prefer, define the token in wp-config.php with define( 'GFCW_API_TOKEN', 'your token' );. The add-on then uses the constant, the settings page says so, and no token is stored in the database at all.

Create a feed

Open the form, then Settings → Chatwoot, and click Add New. A feed decides how one form talks to Chatwoot. A form can have several feeds, for example one per department, each with its own condition.

The Chatwoot feed settings in Gravity Forms: contact email, name and phone, custom attribute map, inbox, subject, message, status, labels, agent and team
A feed: the contact fields, the custom attribute map and the conversation options.

The contact

  • Contact email: the merge tag of your email field, for example {Email:2}.
  • Contact name: for example {Name (First):1.3} {Name (Last):1.6}.
  • Contact phone: the merge tag of your phone field. Chatwoot stores phone numbers in international form, with a plus sign and the country code, such as +1 415 555 0123. Spaces, dots, dashes and brackets are removed and a leading 00 becomes a plus; a number without a country code is left out and the entry note says so, while the rest is still sent.
  • Custom attributes: pairs of a Chatwoot attribute key and a form field. Create the attribute in Chatwoot first under Settings → Custom Attributes, applied to contacts, and type its key here, such as company or plan. Choose a field, or Add Custom Value to combine merge tags. Empty answers are skipped, so an empty field never wipes a value Chatwoot already holds.

An email or a phone number is needed to identify the contact. With an email, the add-on searches Chatwoot for a contact with exactly that address and updates it; Chatwoot’s search is a loose match, so a similar address is never mistaken for the same person. Without an email, the phone number is used the same way. If no contact matches, a new contact is created in the chosen inbox. Updating keeps what Chatwoot already knows: custom attributes you do not map are left alone.

The conversation

  • Conversation: tick to open a conversation for each submission. Untick to keep Chatwoot as a contact list only, for example for a newsletter or event sign-up form.
  • Inbox ID: leave empty to use the default inbox, type an id, or use a merge tag so a choice on the form decides the inbox.
  • Subject: optional; shown as the subject of the conversation in an email inbox.
  • Message: the first message. The default {all_fields} writes a clean list of every answer, one per line. You can write your own text around merge tags. Fields hidden by conditional logic are left out, and anything a visitor types is sent as plain text, never run as a merge tag.
  • Add the message as: a message from the contact, so it reads like they wrote in, or a private note that only agents see.
  • Entry link: adds the form name and a link to the Gravity Forms entry at the end of the message.
  • Status: open, pending or resolved.
  • Labels: a comma-separated list, for example website, {Topic:6}. Labels are lowercased and spaces become dashes. Create the labels in Chatwoot first under Settings → Labels.
  • Assign to agent ID and Assign to team ID: optional numeric ids from Settings, Agents and Settings, Teams. Merge tags work, so a form choice can route a request to a team.
  • Condition: standard Gravity Forms conditional logic, so the feed runs only when your rule matches.

What happens on submit

The visitor sees your normal confirmation and nothing else; the Chatwoot work happens in the background of the same request. For each feed whose condition matches, the add-on finds or creates the contact, then opens the conversation, adds the message and sets the labels.

A front-end Gravity Form for talking to sales with name, email, phone, company, plan, topic and a message field
A form with name, email, phone, company, plan, topic and a message.

Each entry gets a note that lists what was done, for example contact #41 created, conversation #1201 created in inbox 1, message added, labels website, demo, followed by a link straight to the conversation in your Chatwoot dashboard. The links to the contact and to the conversation are also saved with the entry, so you can add them as columns in the entry list or use them in notifications.

A Gravity Forms entry screen with the field values and a note confirming the Chatwoot contact and conversation were created, with a link
The entry with its note: the Chatwoot contact and conversation and a link into Chatwoot.

Retries never create duplicates

Networks fail, and a Chatwoot can be slow for a moment. The add-on is built so that sending an entry again, with Resend Feeds in the entry list or after an error, never creates a second contact, conversation or message:

  • The ids of the contact, the conversation and the message are kept on the entry. A step that already worked is not repeated.
  • Each conversation carries a reference to the site, entry and feed. If a conversation was created but the answer never arrived, the next run finds it by that reference instead of opening another one. If the earlier conversations cannot be checked, no new conversation is opened, so there is never a risk of a duplicate.
  • If another request creates the same contact at the same moment, the add-on finds and reuses it.
  • While a feed is being sent for an entry, a second run for the same entry and feed is skipped with a note instead of sending twice.

Errors and troubleshooting

A failed call never blocks the submission: the entry is saved and a note explains what went wrong, in Chatwoot’s own words, with the token removed. Common messages and their fixes:

  • HTTP 401 Invalid Access Token: copy the token again from Profile Settings; a token changes when it is reset.
  • HTTP 404 Resource could not be found: the account id or the inbox id is wrong. Run Test connection to see the right ids.
  • HTTP 403 Access denied: the user of the token cannot see that inbox. Add the user to the inbox, or use an administrator token.
  • HTTP 422: Chatwoot refused a value, for example a phone number that is not in international form or a custom attribute that does not exist.
  • The labels were not added: the contact and conversation are kept; create the missing label in Chatwoot and use Resend Feeds.
  • The address redirects: use the final https address of your Chatwoot. Redirects are not followed, so a token cannot be led to another host.

Privacy and security

  • The access token is encrypted with a key derived from your site’s own secret salts, is sent only in the request header Chatwoot expects, and is never written to an entry, a note or a log.
  • The add-on only contacts the Chatwoot address you set. Addresses on a private or local network are refused, so a form cannot be used to reach internal systems. If your Chatwoot really lives inside your network, a developer can allow that one host with the gfcw_allow_private_hosts filter.
  • Connections use https with certificate checks.
  • Uninstalling the add-on removes its settings and the stored token. Contacts and conversations already in Chatwoot stay there.

For developers

Filters: gfcw_contact_input and gfcw_conversation_input adjust what is sent; gfcw_timeout changes the request timeout; gfcw_allow_private_hosts and gfcw_allow_insecure_http open an internal or plain-http Chatwoot. Actions: gfcw_contact_saved, gfcw_conversation_created and gfcw_failed let you run your own code after each result.

Frequently asked questions

Does it work with Chatwoot Cloud and self-hosted Chatwoot?

Yes. The add-on uses the standard Chatwoot application API, which is the same on Chatwoot Cloud and on a self-hosted install, including one under a sub-folder or on its own port.

Will the contact receive an email?

The form message is added as an incoming message from the contact or as a private note, so the add-on itself does not send the contact anything. Your own Chatwoot automations still run as usual.

Can I only create contacts?

Yes. Untick Conversation in the feed and only the contact is created or updated, with the link saved on the entry.

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