This tutorial will walk you through connecting Gravity Forms to SendFox and ensuring your contacts are added to your email marketing lists.
Integrating your form submissions from Gravity Forms directly into your SendFox email marketing list can streamline your workflow and ensure that every new submission is automatically added to your audience.
What You’ll Need:
- Gravity Forms installed.
- The Gravity Forms Webhooks Add-On activated (requires an Elite license).
- A SendFox account with API access.
Let’s get started!
Step 1: Obtain Your SendFox API Key
First, you’ll need to retrieve your SendFox Personal Access Token (PAT) to authenticate requests from Gravity Forms.
- Log in to your SendFox account.
- Navigate to the API section under Account Settings.
- Click Create New Token
- Give your token a name (i.e. Gravity Forms)
- Copy the token
Save your token somewhere safe because you can not view this again.
Step 2: Set Up a List in SendFox
Make sure you have a list created in SendFox where you want to send the form submission data.
- Go to the Audience tab in SendFox.
- If necessary, create a new list. You can also use an existing list.
- Record your list ID. This is located in the URL for the list page.
The ID will allow you to direct form submissions to the correct list in SendFox. Without a specific list ID, contacts will be added to your contacts but not to any particular list.
Step 3: Install and Activate the Gravity Forms Webhooks Add-On
If you haven’t already, you’ll need to install and activate the Webhooks Add-On in Gravity Forms. It is only available with an Elite license.
- In your WordPress dashboard, navigate to Forms > Add-Ons.
- Find the Webhooks Add-On and click Install.
- Once installed, click Activate.
Step 4: Create a New Webhook Feed
Let’s create the webhook feed to send your form data to SendFox. You must do this for each form you want to integrate with SendFox.
- Go to Forms and select the form you want to integrate with SendFox.
- Navigate to Settings > Webhooks > Add New.
Here’s how to configure your webhook:
- Set the Request URL to:
https://api.sendfox.com/contacts
This is the SendFox endpoint for adding new contacts.
- Select POST as the Request Method.
This is how you communicate to the API that you are sending new data to SendFox.
- Set the Request Format to JSON.
This is the format in which the data will be sent.
- The Request Headers settings
You will need to add an authorization header to authenticate your API request.
- Select Authorization
- Select Add Custom Value
- Paste in Bearer YOUR_PAT_KEY
Authorization: Bearer YOUR_PAT_KEY
Replace YOUR_PAT_KEY with the Personal Access Token you copied from SendFox in step one.
- The Request Body settings
This is where you will map the form fields in Gravity Forms to SendFox fields like email, first name, and last name. Only email is required.
In the example above, the fields on the left represent SendFox, and those on the right are Gravity Forms fields.
This may look a little different depending on the types of fields you are using.
In this section, you will specify which list you want to add these contacts to. See the known limitations below for details about add-on multiple lists.
This is where you will use the list ID from SendFox, which you collected in step two.
- Click the + to add a new field
- Enter lists in the field on the left
- Select Add Custom Field from the field on the right
- Enter the list ID number
Step 5: Save and Test Your Webhook
Once your webhook is configured, click Save Settings. Now it’s time to test your integration.
- Enable Gravity Forms logging (how to enable logging)
- Submit a test form entry using the form.
- Check your SendFox account to see if the new contact has been added to the correct list.
The submission should appear in your specified list if everything is set up correctly. If you do not see the contact added to SendFox, the logs can help you identify any errors.
Troubleshooting Tips
Authorization Errors: If you receive an authentication error, double-check that your Personal Access Token is correctly formatted as Bearer YOUR_PAT_KEY.
Field Mapping Issues: Ensure that the SendFox field slugs are correct. You can find these here in your SendFox account.
Known Limitation
Although the SendFox API appears to support adding the contact to multiple lists, using multiple list IDs does not work within the Gravity Forms webhooks settings.
The Wrap Up
By connecting Gravity Forms with SendFox through the Webhooks Add-On, you can automate adding new contacts to your email lists.
This integration ensures that your email marketing efforts stay aligned with the latest data, saving you time and helping to grow your audience seamlessly.
Do you have questions about this setup or want more Gravity Forms tutorials? Let us know in the comments below!