Groundhogg Webhooks


You can use webhooks in Groundhogg to sync contact data back to WP Fusion installed on another website.

Webhooks can be used to automatically import Groundhogg contacts as new WordPress users, or trigger an update of existing users’ metadata and tags.

Note: This tutorial only applies if you are using WP Fusion to connect to Groundhogg on another site, over the REST API. If WP Fusion and Groundhogg are installed on the same site, edits in Groundhogg are synced back to WP Fusion automatically (there’s no need for webhooks).

Webhooks in Groundhogg require the Advanced Features addon.
Having trouble receiving webhooks? Check out our troubleshooting guide.

#Getting Started

Open a funnel (or create a new one) and create a new benchmark.

For example, to trigger WP Fusion to sync a contact when a tag is applied, choose the Tag Applied benchmark. Then add a new step, add a Webhook action.

Choose GET as Method, and in the Target URL field, put the URL to your website, like so:

The values in the Params section depend on the type of webhook you want to send. See below for examples.

For each you will need to supply your access key, which can be obtained from the bottom of the General tab in the WP Fusion settings:

#To update a user’s tags

To update an existing WordPress user’s tags from the Groundhogg contact record, under Params, you should have:

contact_id = {id}
wpf_action = update_tags
access_key = [your access key]

#To update a user’s tags and meta data

To update a user’s tags and pull any new meta data from Groundhogg for that contact, under Params, you should have:

contact_id = {id}
wpf_action = update
access_key = [your access key]

#Create a new user

Using this method, you can register a new user on your website when a contact is created in Groundhogg. Under Params, you should have:

contact_id = {id}
wpf_action = add
access_key = [your access key]

There are two additional options, which you can leave out if you don’t need them.

send_notification = true
role = subscriber

If you set send_notification to true, the user will be sent a welcome email with their username, password, and a link to log in on your site.

You can also set the role parameter to assign users a specific role on your site. By default users will be imported with the role set in the WordPress’ Settings » General “New User Default Role” field, but sometimes you may want to create users with a different role depending on conditions in your campaign sequence.

The add method will update a user if an existing user already exists. It will not create a duplicate user.

Note: By default, user accounts will be created with their email address as the username and a randomly generated password. However, if you have created a custom username field and password field in Groundhogg, and enabled these fields in WP Fusion for sync with user_login and user_pass on your website, the new users will be given the usernames and passwords stored in their Groundhogg contact record.

#User passwords

New user accounts will be created with an automatically generated password. If you’d like to use this password in your email marketing, you can send the password back to Groundhogg after it has been generated.

In the Webhooks section of the General settings tab, check the box for Return Password, and select a field in Groundhogg where the password should be stored.

After a new user is created, their automatically generated password will now be saved back to their contact record, and you can use a merge field to include it in an email. The username will be the contact’s email address.

Was this helpful?