Skip to main content

Overview

The OneSignal + MotherDuck integration enables automatic syncing of custom events from your MotherDuck databases to OneSignal to trigger automated messaging campaigns and Journeys based on user behavior. MotherDuck is a DuckDB-in-the-cloud service that provides fast OLAP (Online Analytical Processing) capabilities with the simplicity of SQL.

Requirements

MotherDuck

  • MotherDuck account with database access
  • Service token for authentication
  • Database containing event data
  • Tables or views with structured event information

Setup

1

Create MotherDuck service token

Generate an access token for OneSignal to connect to MotherDuck:
  1. Log in to the MotherDuck Web UI at app.motherduck.com
  2. Click your profile in the top-left corner
  3. Navigate to Settings > General > Access Tokens
  4. Click Create Token
  5. Set expiration date (or leave unlimited)
  6. Copy the generated service token
2

Prepare your event data

Ensure your MotherDuck database contains properly structured event tables:
3

Connect to OneSignal

In OneSignal, go to Data > Integrations and click Add Integration.Select MotherDuck and provide:
  • Service Token: Token from Step 1
  • Database Name: Your MotherDuck database name
  • Connection String: md:your_database_name
4

Configure data sync

Select the tables or write custom SQL queries to define which event data to sync:

Event data mapping

Map your to OneSignal’s custom events format:

Example Event Query


Processing Modes

Table Mode

Sync entire tables directly from your MotherDuck database. OneSignal will automatically map columns to event fields.

SQL Query Mode

Write custom DuckDB SQL queries to transform and filter your event data:

Limitations

  • Query complexity affects sync performance
  • Large result sets may impact sync speed
  • JSON parsing requires proper column typing

FAQ

How do I optimize query performance in MotherDuck?

Use DuckDB’s columnar storage advantages by selecting only needed columns and applying filters early in your queries.

Can I sync from multiple MotherDuck databases?

Yes, you can create separate integrations for each MotherDuck database in your account.