Overview
The OneSignal + Amazon S3 integration enables automatic syncing of custom events from CSV files stored in your S3 bucket 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 data warehouse. 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
OneSignal
- Custom Events feature enabled (currently in beta - contact
support@onesignal.com
)
Amazon S3
- AWS Account with S3 bucket access
- IAM permissions to create roles and policies
- CSV files with event data formatted according to OneSignal requirements
- UTF-8 encoded comma-delimited files with
.csv
extension
Setup
Prepare your event CSV files
Your S3 bucket must contain properly formatted CSV files with event data that OneSignal can process: File Format Requirements:- Uncompressed, UTF-8 encoded, comma delimited CSV with
.csv
file extension - Include a header row (OneSignal will use headers as event field names)
- Represent null values with the string
#N/A
- Values containing commas should be wrapped in double quotes
- Values containing double quotes should be escaped with a second double quote
Create IAM role for OneSignal
OneSignal uses role-based authentication to connect to your S3 bucket, following AWS security best practices.1
Create the IAM role
Create an IAM role in your AWS account that provides read-only access to your S3 bucket for OneSignal’s AWS Account ID (
341876425553
):Save the returned Role ARN as you’ll need it for the OneSignal configuration.
2
Grant S3 permissions
Grant your newly-created role read-only access to your S3 bucket:
Replace
YOUR_BUCKET_NAME
with your actual S3 bucket name.Configure OneSignal S3 connection
1
Navigate to Data Sources
In OneSignal, go to Data > Integrations and click Add Integration.
2
Select Amazon S3
Choose Amazon S3 from the list of available integrations.
3
Enter connection details
Provide the following information:
- Region: Your S3 bucket region
- Bucket Name: Your S3 bucket name
- Role ARN: The IAM role ARN from Step 1
- Prefix: The folder path containing your event CSV files (optional)
4
Complete the security handshake
OneSignal will generate a unique external ID and display it on the next screen. Update your IAM role to require this external ID:
Replace
GENERATED_EXTERNAL_ID
with the external ID shown in the OneSignal dashboard.5
Test the connection
Click Test Connection in OneSignal to verify the setup is working correctly.
CSV Processing Modes
OneSignal supports two modes when reading event CSV files from your S3 bucket:Most Recent (Default)
OneSignal processes only the most recent file in the configured S3 prefix and folder group. The single file is interpreted as the complete set of events to process. This mode works well when:- A single file contains all events for a time period
- New versions of files are added over time with updated event data
- You want to process a complete batch of events at once
Merge All
OneSignal takes every file in the configured S3 prefix and folder group and merges them into a single dataset before processing events. This mode is useful when:- Your event data has been split into multiple files
- You want to process events from multiple sources
- Files are being added incrementally with new events
In Merge All mode, all CSV files must have the exact same column names and order.
Event Data Mapping
Once connected, you’ll need to map your CSV columns to OneSignal custom event fields:1
Review detected fields
OneSignal will automatically detect columns from your event CSV files and suggest mappings.
2
Map required event fields
Map the required fields for custom events:
- Event Name (required): The name/type of the event
- External ID (required): External User ID
- Event Timestamp (optional): When the event occurred. Otherwise, assumed to be now.
3
Configure sync settings
Set your event processing frequency and delivery preferences.
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 |
Limitations
- SQL Queries: S3 sources do not support SQL queries or advanced transformations on event data
- File Size: Individual CSV files should not exceed 1GB
- Update Frequency: Minimum sync interval is 15 minutes
- File Types: Only CSV files are supported (no JSON, Parquet, etc.)
FAQ
What happens if my CSV file has formatting errors?
OneSignal will skip malformed rows and provide detailed error logs in the integrations dashboard. Common issues include missing required columns, invalid timestamp formats, and inconsistent column counts.How often does OneSignal check for new files?
OneSignal checks your S3 bucket based on your configured sync frequency, with a minimum interval of 15 minutes.Need help?
Contact our support team atsupport@onesignal.com
or use the in-app chat for assistance with your S3 integration setup.