Overview
The OneSignal + BigQuery integration supports two powerful data pipelines:- Export: Automatically send messaging event data (push, email, SMS, in-app) from OneSignal to BigQuery for analysis and reporting.
- Import: Sync custom user events from your BigQuery datasets to OneSignal to trigger automated Journeys and personalized messaging.
Export OneSignal events to BigQuery
Send messaging performance and engagement events (e.g., sends, opens, clicks) to BigQuery to:- Build custom dashboards and reports
- Track delivery and engagement trends across channels
- Combine OneSignal data with other business data for analysis
- 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 Cloud Platform project with billing enabled
- BigQuery enabled in your GCP project
- Service account with BigQuery write permissions
1. Create a Service Account
Log in to your Google Cloud Platform account

Create a service account

Fill out the fields.

Assign the appropriate BigQuery roles

Create a JSON key for this account
Roles and permissions
The minimum role required to sync OneSignal events into BigQuery is BigQuery User. This role allows OneSignal to:- Run, enumerate, and cancel its own jobs, including update jobs
- Read, query, and enumerate all datasets within a project
- Create new datasets within the project and grant the
bigquery.dataOwnerrole for these new datasets
bigquery.dataOwner role for that dataset.
To grant the bigquery.dataOwner role for an existing dataset:
- Log in to the BigQuery console.
- In the Explorer pane, locate the dataset where you want to sync your data.
- Click View actions > Share > Manage Permissions for the dataset.
- Click Add principal.
- In the New principals field, enter the service account you want to use for your destination.
- In the Role drop-down menu, select BigQuery Data Owner.
- Click Save.
2. Activate the Integration in OneSignal
Go to OneSignal > Data > Integrations > BigQuery
Paste your service account JSON key
Configure settings
- Sync Frequency: As often as every 15 minutes
- Dataset/Table Names: Must only contain lowercase letters, numbers and underscores, and cannot begin with a number.
- Event Types: Select specific message events (e.g., sent, opened, clicked)
- Note: You can select multiple event types or update selected events at a later time.
Click Save and wait for confirmation
3. View Data in BigQuery
Open your BigQuery console and locate the dataset (e.g.,onesignal_events_<app-id>) to explore synced message events.

BigQuery dataset containing exported message events
Message events and properties
Message event kinds
Property:event_kind
Type: String
The kind of message and event (e.g. message.push.received, message.push.sent).
Event data schema
For each message event generated by a user, the following metadata will be attached to the record.Notes
- Syncs after saving/activating may take an additional 15-30 minutes to complete.
- Deactivating may still result in one final sync after deactivation.
- To ensure efficient data synchronization, our system automatically creates and manages staging datasets. These datasets, named with a pattern like
fivetran_{two random words}_staging, temporarily store data during processing before it’s integrated into your main schema. These staging datasets are essential for maintaining a streamlined workflow and should not be deleted, as they will be automatically recreated.
Import events from BigQuery
Send behavioral event data from BigQuery to OneSignal to:- Trigger Journeys based on user activity
- Personalize messaging based on behavioral data
- 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)
- GCP project with BigQuery and event data tables
- Service account with read permissions
- Event data tables containing behavioral data in BigQuery datasets
Create BigQuery service account
Grant required permissions
bigquery.dataViewer- Read access to datasets and tables containing event databigquery.jobUser- Permission to create jobs for data queriesbigquery.metadataViewer- Project-level metadata access (recommended)
Add integration in OneSignal

Add BigQuery integration
- Sync Engine: Advanced sync is recommended for large datasets or complex event data queries. You can start with basic sync and switch to advanced sync later if needed.
- Google Cloud Project ID: Your GCP project containing BigQuery datasets
- Dataset Region: Location where your BigQuery datasets are stored
- Service Account Key (optional): JSON key file if using your own service account
Configure event data source
- Dataset: BigQuery dataset name (e.g.,
analytics_events) - Table/View: Table or view containing event records
- Event Query: Optional SQL query to filter or transform event data
- Event name/type
- User identifier
- Event timestamp
- Additional event properties
Test the connection
Event data mapping
The BigQuery integration recognizes three dedicated fields. All other columns are collected into theproperties object on the custom event.
Advanced configuration
Custom SQL Queries
Use custom SQL to filter or transform event data before syncing to OneSignal:Cross-Project Access
If your event data spans multiple BigQuery projects, grant the OneSignal service account access to each project containing referenced tables or views.FAQ
Why is my sync failing?
There are a few common reasons why your sync may be failing:- The service account does not have the required permissions
- The source dataset is too large for a basic sync and you need to use advanced sync
support@onesignal.com.
Why do I see multiple message IDs for the same content?
This typically occurs when a message template is reused across multiple sends or triggered flows.How often does OneSignal sync data?
Both export and import integrations can sync as frequently as every 15 minutes.Can I use BigQuery views?
Yes. Just make sure the service account has access to all referenced tables in the view.How can I assign a Big Query Data Owner role to the service account?
- Log in to the BigQuery console
- In the Explorer pane, locate the dataset where you want to sync your data
- Click View actions>Share>Manage Permissions for the dataset
- Click Add principal
- In the New principals field, enter the service account you want to use for your destination
- In the Role drop-down menu, select BigQuery Data Owner
- Click Save
Related Resources
- Creating service account keys in GCP
- OneSignal Journeys documentation
- OneSignal Data Export documentation