This guide illustrates the required steps to setup a connection between OneSignal’s Event Webhooks to a custom Google Sheets document to analyze message events generated by OneSignal.
Enable Event streams, an add-on feature to a paid plan, for your OneSignal application. If you don’t have access to this feature, don’t hesitate to contact your Success Manager or Account Executive for more information.
Navigate to Extensions > Apps Script in the Google Sheet you wish to add OneSignal message events. Next, within the code editor, replace the existing code with the following:
Next, deploy your project. Click Deploy in the top right, and select “Web App” as the deployment type. Provide a description and choose who can access the project; we will select “Anyone” to generate the URL needed in the following step.
From the OneSignal dashboard, navigate to Settings > Event Streams (subject to add-on feature). From there, create a new event stream and select “Trigger when any of the following events occur”. Choose the message events you’d like to sync in the pop-up with Google Sheets. In the example below, we capture all Push Notification events.
Next, in the configuration step, choose POST, paste the previous step’s URL, and create a header to accept the JSON.
After this, select “Custom Body” in the Step 3 Dropdown and copy/paste the following code. You can change the properties and events you want to sync, as depicted in the example below. For more information on event stream event properties, visit our documentation
Finally, select “Save & Activate” to synchronize the chosen message events to the Google Sheet. Below is an example of how the sample code above renders:
This guide illustrates the required steps to setup a connection between OneSignal’s Event Webhooks to a custom Google Sheets document to analyze message events generated by OneSignal.
Enable Event streams, an add-on feature to a paid plan, for your OneSignal application. If you don’t have access to this feature, don’t hesitate to contact your Success Manager or Account Executive for more information.
Navigate to Extensions > Apps Script in the Google Sheet you wish to add OneSignal message events. Next, within the code editor, replace the existing code with the following:
Next, deploy your project. Click Deploy in the top right, and select “Web App” as the deployment type. Provide a description and choose who can access the project; we will select “Anyone” to generate the URL needed in the following step.
From the OneSignal dashboard, navigate to Settings > Event Streams (subject to add-on feature). From there, create a new event stream and select “Trigger when any of the following events occur”. Choose the message events you’d like to sync in the pop-up with Google Sheets. In the example below, we capture all Push Notification events.
Next, in the configuration step, choose POST, paste the previous step’s URL, and create a header to accept the JSON.
After this, select “Custom Body” in the Step 3 Dropdown and copy/paste the following code. You can change the properties and events you want to sync, as depicted in the example below. For more information on event stream event properties, visit our documentation
Finally, select “Save & Activate” to synchronize the chosen message events to the Google Sheet. Below is an example of how the sample code above renders: