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

Gravity Forms Zoho Campaigns Premium Add-on Setup Guide

Updated 8 min read Gravity Forms CRM & Email Marketing
On this page
  1. Video walkthrough
  2. What you need
  3. Install and activate
  4. Connect your Zoho account
  5. Option 1: Self Client (the quickest)
  6. Option 2: Server-based client (sign in with Zoho)
  7. How the secrets are kept
  8. Create a feed
  9. Mailing list and topics
  10. Contact fields
  11. Condition
  12. What happens on a submission
  13. For developers and administrators
  14. Troubleshooting
  15. Questions
  16. Do I need a Zoho developer account?
  17. Does it work with every Zoho data centre?
  18. Does it send my subscribers to GravityExtra?
  19. Can one form subscribe people to two lists?
  20. What if the same person signs up again?

Video walkthrough

Gravity Forms Zoho Campaigns Add-On Setup Guide: Zoho OAuth Client and Feed (WordPress Side)
Video setup guide: Gravity Forms Zoho Campaigns Watch on YouTube

The Gravity Forms Zoho Campaigns Premium Add-on subscribes people to your Zoho Campaigns mailing lists and topics from a Gravity Forms submission. When a visitor sends the form, the add-on adds the email address, the name and any custom contact fields you map to the mailing list you choose, and, if you wish, through one or more topics, so that the new contact lands exactly where your newsletters and automations expect it.

You connect your own Zoho account with your own OAuth client from the Zoho API Console, either a Self Client or a Server-based client. The add-on talks to Zoho Campaigns directly from your server, in the data centre where your Zoho account lives: United States, Europe, India, Australia, Japan or Canada. No GravityExtra server sees your subscribers or your Zoho keys.

What you need

  • WordPress 6.5 or newer and PHP 7.4 or newer, with the OpenSSL extension (every normal host has it).
  • Gravity Forms 2.9 or newer. The add-on is tested with Gravity Forms 3.1.2 on PHP 8.3 and Gravity Forms 2.9.8 on PHP 7.4.
  • A Zoho Campaigns account with permission to create an API client, and an active license key for this add-on.

If Gravity Forms is missing or older than 2.9, the add-on shows a notice in the WordPress admin and does nothing else. The add-on uses the Zoho Campaigns API version 1.1.

Install and activate

  1. Install and activate the add-on like any plugin, after Gravity Forms.
  2. Open Forms → Settings → Zoho Campaigns and enter your license key.
  3. The Zoho Campaigns connection section appears. Connect your Zoho account as described next.

Connect your Zoho account

The Zoho Campaigns connection settings in Gravity Forms: data centre, client type, client ID, client secret and Self Client code
Forms, Settings, Zoho Campaigns: your own Zoho client and the data centre.

Choose the data centre first. It is the one your Zoho address ends with: zoho.com is the United States, zoho.eu Europe, zoho.in India, zoho.com.au Australia, zoho.jp Japan and zohocloud.ca Canada. A client made in one data centre does not work in another, so choose the same one you used in the API Console.

Option 1: Self Client (the quickest)

  1. Open the Zoho API Console for your data centre and choose Add Client → Self Client.
  2. Copy the Client ID and the Client Secret into the add-on settings.
  3. In the Self Client, open Generate Code. As the scope, enter ZohoCampaigns.contact.ALL. Choose a time duration of 10 minutes, give a short description, press Create and copy the code.
  4. Paste the code into the field Self Client code and press Save Settings.

The add-on exchanges the code for a long-lived refresh token, stores it encrypted, reads your mailing lists to prove the connection works, and tells you so at the top of the settings, for example that two mailing lists were found. The code is used once and is not stored.

Option 2: Server-based client (sign in with Zoho)

  1. In the API Console choose Add Client → Server-based Applications.
  2. Add the Authorized Redirect URI that the settings screen shows (it ends with page=gf_settings and subview=gfzohocampaigns).
  3. Copy the Client ID and the Client Secret into the settings, choose Server-based as the client type and save.
  4. Press Sign in with Zoho, accept the access, and you come back to the settings, connected.

Both types end the same way: a refresh token that the add-on uses to get short-lived access tokens. Access tokens are cached for a little under their lifetime, stored encrypted, and renewed by themselves. If Zoho answers that a token has expired, the add-on renews it and repeats the call once.

How the secrets are kept

The client secret, the refresh token and the cached access tokens are encrypted with AES-256-GCM before they are saved in the database, with a key made from your site’s WordPress salts. The client secret is never sent back to the browser: the settings screen shows a mask, and saving with the mask keeps the stored secret. If you change the salts in wp-config.php, the stored secrets can no longer be read, and you simply enter the secret again and reconnect. Uninstalling the add-on from the Plugins screen removes everything it stored.

Create a feed

Open Forms → Settings of a form, choose Zoho Campaigns and Add New. A form can have several feeds, for example one that adds everybody to the main newsletter and one that adds people who tick a box about events to a second list, each with its own condition.

The Zoho Campaigns feed settings: mailing list, topics, source name, standard contact fields, custom fields and the condition
The feed: the list and topics from your Zoho Campaigns, the contact fields and the condition.

Mailing list and topics

  • Mailing list: the list is read from your Zoho Campaigns account. The list is kept for ten minutes, so a new list appears in the feed after a short while.
  • Topics: if your account has topics, they are shown as check boxes. Tick the ones to subscribe through. The add-on sends one request per ticked topic, each with the list and the topic. Leave all topics unticked to subscribe to the list only.
  • Source name: the text Zoho Campaigns shows as the source of the contact. The default is Gravity Forms.

Zoho Campaigns decides what happens next. If the mailing list has a signup form enabled, Zoho sends the contact a confirmation email and adds the contact only after the contact confirms. If the list has no signup form, the contact is added at once. The note on the entry repeats the message that Zoho answered, so you can see which of the two happened.

Contact fields

Map the form fields to the standard contact fields: Email (required), first name and last name. A Name field offers its first and last name parts. If you have only one field for the whole name, map it to both first name and last name and the add-on splits it at the last space.

Under Custom fields, add as many rows as you need. Each row has a Zoho contact field and a value. The field drop-down lists the contact fields of your own Zoho Campaigns account, custom fields included, read live from Zoho. You can also type a field name exactly as Zoho Campaigns shows it. The value is a form field, or free text with merge tags. A row whose field name has unusual characters is ignored, and a row for the email field cannot replace the mapped email address.

Condition

Use the condition to subscribe only some submissions. The most common use is a consent check box: subscribe only when the box is ticked. You can also route people to different lists with several feeds, each with a condition on a drop-down.

What happens on a submission

  1. The visitor sends the form. Gravity Forms saves the entry as always.
  2. The add-on checks the email address and the list. Without a valid email, or without a list, it adds a note and stops.
  3. It sends the subscription to Zoho Campaigns: the list key, the contact details as JSON, the source and, for each ticked topic, the topic id.
  4. It writes a note on the entry for every request: who was subscribed, to the list or to which topic, and the message Zoho answered. The finished requests are saved as entry meta so that a re-run of the feeds never subscribes the same entry twice.
A Gravity Forms entry screen with the note the add-on wrote: the contact subscribed to a Zoho Campaigns topic
On every entry: who was subscribed, to which list or topic, and what Zoho answered.

Everything is done on the server when the form is sent, so the visitor never sees Zoho or waits for anything but the normal confirmation. If Zoho Campaigns is down or refuses a request, the entry is saved, and the note on it shows the answer from Zoho, for example the error code and message. When some requests worked and others failed, only the missing ones are sent again if the feeds run again.

If Zoho answers that the contact is already in the list (error code 2003), the add-on counts that as done: the contact is where you wanted it, and the note says so.

For developers and administrators

  • The finished targets of a feed are saved in the entry meta key gfzc_done_ followed by the feed id, as a list of the words list and topic with the topic id.
  • The add-on stores one option, gravityformsaddon_gfzohocampaigns_settings, and transients for the access token and for the cached lists, topics and fields.
  • All requests use the WordPress HTTP API with SSL verification on, so a site can filter or log them in the usual ways.
  • Zoho limits the subscribe call to 500 requests a minute, 12,500 an hour and 75,000 a day; the read calls that fill the feed screen are cached to stay far below their limits.

Troubleshooting

  • The list drop-down is empty: check the connection message in the settings and the data centre. The drop-down shows the Zoho error under the field.
  • Zoho refused the request: invalid_code: the Self Client code was already used or older than its time limit. Generate a new one.
  • HTTP 401 or invalid_client: the client ID or secret does not match the data centre, or the refresh token was revoked. Connect again.
  • Code 2501, Listkey is empty or invalid: the list was deleted in Zoho or the feed has no list. Choose the list again.
  • No subscription and a note about the email: the email field is empty or not a valid address.
  • A custom field is not filled: use the field name exactly as Zoho Campaigns shows it, or pick it from the drop-down.
  • I changed my salts: enter the client secret again and reconnect.

Questions

Do I need a Zoho developer account?

You need access to the Zoho API Console of the account that owns the Zoho Campaigns account. Creating a Self Client takes about two minutes and costs nothing.

Does it work with every Zoho data centre?

It works with the United States, Europe, India, Australia, Japan and Canada data centres. Pick the one where your Zoho account lives.

Does it send my subscribers to GravityExtra?

No. The add-on contacts only Zoho, from your own server, with your own keys. The only call to GravityExtra is the license check and the update check.

Can one form subscribe people to two lists?

Yes. Add two feeds, each with its own list and, if you wish, its own condition. Or tick two topics in one feed.

What if the same person signs up again?

Zoho Campaigns updates the contact. If the contact is already in the list, the entry note says so and nothing is reported as an error.

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