Overview
The OneSignal + Google AlloyDB integration enables automatic syncing of custom events from your AlloyDB database directly to OneSignal’s Custom Events API. This allows you to trigger automated Journeys and personalized messaging campaigns based on real user behavior stored in your database. You can sync events like purchases, product views, subscription changes, or any custom user actions to automatically trigger onboarding sequences, re-engagement campaigns, transactional messages, and targeted promotions across push notifications, email, in-app messages, and SMS.Requirements
- Access to Event Streams for outbound message events (Plan limitations and overages apply)
- Access to Custom Events for inbound event syncing (Plan limitations and overages apply)
- Updated Account Plan (not available on free apps)
Google AlloyDB
- Google Cloud Platform account with AlloyDB instance
- Auth Proxy configured as required by Google Cloud
- Database permissions to create users and grant access
- Network access to your AlloyDB instance
Setup
Configure AlloyDB permissions
OneSignal needs to read event data from your AlloyDB database. We recommend creating a dedicatedONESIGNAL user account with read-only access to your event tables.
Grant schema access
Grant the OneSignal user access to read from your event data schema:
Replace
<your_event_schema> with the actual schema containing your event tables.Set up Auth Proxy
Configure Auth Proxy
AlloyDB requires an Auth Proxy for third-party connections. Follow Google’s Auth Proxy documentation to set this up.
Configure OneSignal AlloyDB connection
Enter connection details
Provide the AlloyDB connection information:
- Host: Your Auth Proxy endpoint
- Port: Auth Proxy port
- Database: AlloyDB database name
- Username:
ONESIGNAL - Password: User password
- SSL: Enabled (recommended)
Event Data Mapping
Once connected, you’ll need to map your AlloyDB table columns to OneSignal custom event fields:Select event tables
Choose the tables containing your event data that you want to sync to OneSignal.
Map required event fields
Map the required fields for custom events:
- Event Name: Column containing the event type (e.g., “purchase”, “signup”)
- User Identifier: External User ID, Email, or Phone Number column
- Event Timestamp: When the event occurred (optional)
Map event payload data
Map additional columns to event payload properties:
- Custom event properties (product_id, price, category, etc.)
- Contextual data (source, campaign, etc.)
- Behavioral metrics (value, quantity, etc.)
Event data mapping
Map your to OneSignal’s custom events format:| OneSignal Field | Description | Required | |
|---|---|---|---|
name | event_name | Event identifier | Yes |
external_id | user_id | User identifier | Yes |
timestamp | event_timestamp | When event occurred | No |
properties | event_data | No |
Advanced Network Configuration
IP Address Allowlists
If your AlloyDB instance uses IP allowlists, add OneSignal’s IP addresses. You can find the current IP ranges in your OneSignal dashboard under Data > Integrations > Network Access.SSH Tunneling
OneSignal supports connecting to AlloyDB through SSH tunnels for additional security:Configure SSH tunnel
In the OneSignal AlloyDB connection settings, enable Use SSH Tunnel and provide:
- SSH Host
- SSH Port
- SSH Username
Limitations
- Performance: Avoid connecting to production databases during peak usage
- Permissions: OneSignal requires read-only access to event tables
- Auth Proxy: Required for all AlloyDB connections
FAQ
What happens if my event table structure changes?
OneSignal will detect schema changes and may require remapping of fields. Update your field mappings in the integration settings.How often does OneSignal sync events?
OneSignal checks for new events based on your configured sync frequency, with a minimum interval of 15 minutes.Need help?
Contact our support team at[email protected] or use the in-app chat for assistance with your AlloyDB integration setup.