🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 28, 2026

How to Send OneSignal Push Notifications from Gravity Forms

GravityExtra
How to Send OneSignal Push Notifications from Gravity Forms

Email is where form notifications go to be ignored. An enquiry lands in an inbox with fifty other messages, a support request waits until someone next checks their mail, and an urgent announcement reaches your audience an hour too late. If you want people to act on what comes through a form — your team or your subscribers — a push notification on a phone, a tablet or the desktop is far harder to miss. That is exactly what the Gravity Forms OneSignal Premium Add-on does: it turns every Gravity Forms submission into a OneSignal push notification, with the heading and the content built from your form fields.

OneSignal is one of the most widely used push-notification platforms, with web push and mobile SDKs for iOS and Android, segments, data tags and external user ids. You already have an audience of subscribers there; this add-on lets a Gravity Form reach them the instant a submission comes in. This guide walks through connecting it to Gravity Forms, mapping your fields, choosing who to notify, and keeping the whole thing private and reliable.

Why push notifications for forms

A push notification is immediate and personal. It appears on the lock screen or in the browser, it reaches people wherever they are, and it does not depend on anyone opening an app or an inbox. For the moments that matter — a new announcement, a back-in-stock alert, an order update, a high-value sales enquiry, a last-minute booking, an event reminder — that immediacy is the difference between an engaged audience and a missed opportunity.

Because the notification is built from the submission, the person who receives it already knows what it is about before they open anything. “New enquiry from Maya Chen — team plan, this quarter” is a far better alert than “You have a new form entry.” And because OneSignal targets by segment, by external user id or by data tag, the same form can speak to exactly the right people: your whole subscriber base, your internal team, or one individual.

It also keeps the right people informed without adding yet another inbox to watch. A shop can push an order confirmation straight to the customer who placed it, an operations desk can alert a manager segment when a form flags a problem, and a publisher can announce new content to everyone who subscribed. Because each feed is independent, one form can drive several different notifications at once, each with its own wording, audience and extras, and none of them interferes with the e-mails you already send. You stay in control of exactly who hears what, and when.

What you need before you start

You need WordPress with Gravity Forms 2.9 or newer, PHP 7.4 or newer, an active license for the add-on, and a OneSignal account with an app set up for web or mobile push and some subscribers. Everything on the OneSignal side is self-serve: there is no partner programme and nothing for us to approve.

Step 1: get your OneSignal App ID and REST API key

OneSignal uses two credentials. The App ID identifies your OneSignal app; it is a UUID. The REST API key authorises the request that creates a notification. Both are found in the OneSignal dashboard: open your app and go to Settings → Keys & IDs, where you can copy the App ID and copy or generate a REST API key.

Keep the REST API key private — it can send notifications on behalf of your app. The add-on stores it encrypted and never shows it again, but you should still treat it like a password and generate a new one if you ever suspect it has leaked.

Step 2: connect the add-on

Install and activate the add-on after Gravity Forms, then open Forms → Settings → OneSignal. Activate your license key, then paste in the App ID and the REST API key.

The OneSignal settings page in Gravity Forms: license key, App ID, REST API key and a Send test button
The settings page: your App ID, your REST API key and a Send test button.

The REST API key is encrypted at rest, so the plain value never sits in your database, and it is shown masked after it is saved. If you prefer to keep secrets out of the database entirely, define the GFOS_APP_ID and GFOS_REST_API_KEY constants in wp-config.php and the add-on uses those instead. Press Send test to fire a short test notification at your Subscribed Users — if it arrives, you are ready.

Step 3: add a notification to a form

Open the form you want alerts for, go to its Settings → OneSignal tab, and add a feed. A feed is one notification rule, and a form can have several — for example a confirmation to the customer and a separate alert to a manager segment that only fires when a field is set to “Urgent.”

The OneSignal feed in Gravity Forms: heading, content, who to notify, and an optional launch URL, image and custom data
A feed maps the heading and content, chooses who to notify, and sets the extras.

The heading and the content

Write the heading and the content with merge tags so each notification carries the details of the submission. A heading such as New message from {Name (First):1.3} and content that includes {Subject:3} and {Message:4} gives a readable, specific alert. The content is required; if the merge tags leave it empty, the add-on sends nothing and records a clear note instead of an empty push.

Who to notify

Choose how OneSignal finds the recipients. Send to a segment — the default Subscribed Users, or any segment you have built, several at once if you like. Send to specific external user ids, which you can map from a form field so the person who submitted it receives their own notification. Or send to everyone who matches a tag filter, such as the data tag role equal to manager. The right audience for each form, chosen per feed.

Extras and a condition

Add a launch URL so tapping the notification opens the entry, a product page or anywhere on your site, an image shown with the notification on Android, web and iOS, and custom data as simple key: value lines passed through for your own app to read. Use the condition to send only when a rule is met, so the right people get the right alerts and nothing else.

Step 4: test and watch the entries

Submit a test entry. Your visitor sees only the normal confirmation — the notification is created on your server afterwards, so a slow or failed push never holds up the form. Each entry keeps a note of what happened and the OneSignal notification id and recipient count, which you can also drop into your own Gravity Forms notification emails with the {onesignal_id} and {onesignal_recipients} merge tags.

A Gravity Forms entry screen showing the OneSignal note with the notification id
Every entry records the OneSignal notification id.

The add-on also adds two notification events — OneSignal notification sent and OneSignal notification failed — so you can trigger a follow-up email on either outcome if you want a belt-and-braces record.

Safe sends and clear errors

A notification is created exactly once per entry. If you resend an entry from the admin, or a submission is processed twice, the add-on sees that it has already sent for that feed and does not create a duplicate. When OneSignal returns an error — an invalid key, a rate limit, an aliases problem, a server hiccup — the add-on writes a clear, one-line note to the entry and, crucially, strips your App ID and key out of any message it stores, even when the service echoes them back.

Privacy and security

The add-on only ever contacts the OneSignal REST API at api.onesignal.com over HTTPS. It never follows a redirect to another host, your REST API key travels in the Authorization header and your App ID in the request body, never in the address. The key is encrypted with AES-256-GCM before it is stored, and it is never shown again, never saved with an entry and never written to a log. Uninstalling the add-on removes its settings, including the encrypted key.

Put it to work

Whether you want to confirm an order to the customer who placed it, alert a team segment the moment a form flags a problem, or announce something new to your whole audience, the add-on turns your forms into a reliable push channel in a few minutes. Read the full setup guide for every field in detail, and when you are ready, get the Gravity Forms OneSignal Premium Add-on to start sending notifications from your own forms today.

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