Skip to content
Last updated

Taboola Export Integration

Taboola Output Connector is designed for this functionality is essential for exporting audience data from Taboola’s advertising platform. Specifically, the connector should support the following capabilities:

  1. Create a First Party Audience using user identifiers such as DEVICE_ID and EMAIL_ID (User ID Object).
  2. Manage audience membership by allowing Add/Remove User operations to update the audience dynamically.

Prerequisites

  • Basic knowledge of Treasure Data, including the TD Toolbelt.
  • Basic knowledge of Taboola.

Limitations & Known Issues

  • The schema of the connector is a flattened type.
  • Batch Size: Recommended ≤ 100,000 users per request (for Add/Remove Users).
  • Availability Delay:
    • Audience creation: ~1 hour to be available.
    • Audience scaling: 1–3 days for audience_size to stabilize.​

Static IP Address of Treasure Data Integration

If your security policy requires IP whitelisting, you must add Treasure Data's IP addresses to your allowlist to ensure a successful connection.

Please find the complete list of static IP addresses, organized by region, at the following link:
https://api-docs.treasuredata.com/en/overview/ip-addresses-integrations-result-workers/

Obtain the Client ID and Client Secret

In order to claim your Client ID and Client Secret please contact your Account Manager or contact the support@taboola.com regarding the API credentials.

https://developers.taboola.com/backstage-api/reference/authentication-basics#client-id-and-client-secret

Use the TD Console

Create Authentication

Your first step is to create a new authentication with a set of credentials.

  1. Select Integrations Hub.

  2. Select Catalog.

  3. Search for your Taboola in the Catalog; hover your mouse over the icon and select Create Authentication.

  4. Ensure that the Credentials tab is selected and then enter credential information for the integration.

    New Authentication Fields

    ParameterDescription
    Authentication MethodThe dropdown method is used to authenticate. We will support 1 type of authorization: - OAuth
    Client IDThe Client ID of the Taboola Account.
    Client SecretThe Client Secret of the Taboola Account.
  5. Select Continue.

  6. Enter a name for your authentication, and then select Done.

Configure a Query Result for Export

The TD Console supports multiple ways to export data. Please follow these steps to export data from the Data Workbench.

  1. Navigate to  Data Workbench > Queries.
  2. Select New Query.
  3. In the database drop-down, enter the database you want to query. This example uses test_db.
  4. In the query pane, enter your SQL query.
  5. Select Run to validate the results of the query.
  • Example query:

    SELECT 
      'test@treasure-data.com' as email,  
      '0000000-0000000-01234567-89ABCDEF' as device
    FROM
      your_table
  • The schema should be defined as flattern type. Each row is a cluster as the meaning defined by Taboola.

  • Data specification

Field NameTypeRequiredDescription
email_N or emailStringNo
  • The user_id of the email (Hashed or unhashed is acceptable).
  • An Email Address (as a SHA256 hash)
device_N or deviceStringNo
  • The user_id of the device.
  • A Device ID or MAID (in clear text)

Specify the Result Export Target

  1. Select Export Results.

  1. To export the results to an external service, you can use an existing authentication or create a new one. Choose either
  • Use Existing Integration
  • Create New Integration
  1. Select the existing integration/Create New Integration.
  2. Enter the information in the form.

FieldDescription
Account IDThe account ID of the Taboola Application.
Audience NameA unique name for the audience. If an existing audience_name is used, the server returns the existing audience instead of creating a new one.
TTL in HoursTime-to-live in hours for how long users stay in the audience. Defaults to 8,760 (1 year) if omitted.
OperationThe operation to export data. There are 2 options: - Add - Remove
Skip on invalid recordsEnable skipping the invalid records.
Upload Batch SizeBatch size for sending users each batch. From 1 to 100000.
  1. Select Done to save the configuration.

Example Query

SELECT 'test@treasure-data.com' as email,  
       '0000000-0000000-01234567-89ABCDEF' as device

(Optional) Schedule Query Export Jobs

You can use Scheduled Jobs with Result Export to periodically write the output result to a target destination that you specify.

Treasure Data's scheduler feature supports periodic query execution to achieve high availability.

When two specifications provide conflicting schedule specifications, the specification requesting to execute more often is followed while the other schedule specification is ignored.

For example, if the cron schedule is '0 0 1 * 1', then the 'day of month' specification and 'day of week' are discordant because the former specification requires it to run every first day of each month at midnight (00:00), while the latter specification requires it to run every Monday at midnight (00:00). The latter specification is followed.

Scheduling your Job Using TD Console

  1. Navigate to Data Workbench > Queries

  2. Create a new query or select an existing query.

  3. Next to Schedule, select None.

  4. In the drop-down, select one of the following schedule options:

    Drop-down ValueDescription
    Custom cron...Review Custom cron... details.
    @daily (midnight)Run once a day at midnight (00:00 am) in the specified time zone.
    @hourly (:00)Run every hour at 00 minutes.
    NoneNo schedule.

Custom cron... Details

Cron ValueDescription
0 * * * *Run once an hour.
0 0 * * *Run once a day at midnight.
0 0 1 * *Run once a month at midnight on the morning of the first day of the month.
""Create a job that has no scheduled run time.
 *    *    *    *    *
 -    -    -    -    -
 |    |    |    |    |
 |    |    |    |    +----- day of week (0 - 6) (Sunday=0)
 |    |    |    +---------- month (1 - 12)
 |    |    +--------------- day of month (1 - 31)
 |    +-------------------- hour (0 - 23)
 +------------------------- min (0 - 59)

The following named entries can be used:

  • Day of Week: sun, mon, tue, wed, thu, fri, sat.
  • Month: jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec.

A single space is required between each field. The values for each field can be composed of:

Field ValueExampleExample Description
A single value, within the limits displayed above for each field.
A wildcard '*' to indicate no restriction based on the field.'0 0 1 * *'Configures the schedule to run at midnight (00:00) on the first day of each month.
A range '2-5', indicating the range of accepted values for the field.'0 0 1-10 * *'Configures the schedule to run at midnight (00:00) on the first 10 days of each month.
A list of comma-separated values '2,3,4,5', indicating the list of accepted values for the field.0 0 1,11,21 * *'Configures the schedule to run at midnight (00:00) every 1st, 11th, and 21st day of each month.
A periodicity indicator '*/5' to express how often based on the field's valid range of values a schedule is allowed to run.'30 */2 1 * *'Configures the schedule to run on the 1st of every month, every 2 hours starting at 00:30. '0 0 */5 * *' configures the schedule to run at midnight (00:00) every 5 days starting on the 5th of each month.
A comma-separated list of any of the above except the '*' wildcard is also supported '2,*/5,8-10'.'0 0 5,*/10,25 * *'Configures the schedule to run at midnight (00:00) every 5th, 10th, 20th, and 25th day of each month.
  1. (Optional) You can delay the start time of a query by enabling the Delay execution.

Execute the Query

Save the query with a name and run, or just run the query. Upon successful completion of the query, the query result is automatically exported to the specified destination.

Scheduled jobs that continuously fail due to configuration errors may be disabled on the system side after several notifications.

(Optional) You can delay the start time of a query by enabling the Delay execution.

Activate a Segment in Audience Studio

You can also send segment data to the target platform by creating an activation in the Audience Studio.

  1. Navigate to Audience Studio.
  2. Select a parent segment.
  3. Open the target segment, right-mouse click, and then select Create Activation.
  4. In the Details panel, enter an Activation name and configure the activation according to the previous section on Configuration Parameters.
  5. Customize the activation output in the Output Mapping panel.

  • Attribute Columns
    • Select Export All Columns to export all columns without making any changes.
    • Select + Add Columns to add specific columns for the export. The Output Column Name pre-populates with the same Source column name. You can update the Output Column Name. Continue to select + Add Columnsto add new columns for your activation output.
  • String Builder
    • + Add string to create strings for export. Select from the following values:
      • String: Choose any value; use text to create a custom value.
      • Timestamp: The date and time of the export.
      • Segment Id: The segment ID number.
      • Segment Name: The segment name.
      • Audience Id: The parent segment number.
  1. Set a Schedule.

  • Select the values to define your schedule and optionally include email notifications.
  1. Select Create.

If you need to create an activation for a batch journey, review Creating a Batch Journey Activation.

(Optional) Configure Export Results in Workflow

Within Treasure Workflow, you can specify using this data connector to export data.

Learn more about using workflows to export datawith the TD Toolbelt.

(Optional) Export Integration Using the CLI

You can also use the CLI provided by TD Toolbelt to export query results to LINE messaging.

Using the td query command, you would specify the LINE messaging server URL with the --result RESULT_URL option.  See td query for more information.

The format of the option is JSON, and the general structure is as follows.

Parameters

NameDescriptionValueDefault ValueRequired
typeDescribe the name of the service as the destination of export.taboolaYes
auth_methodThe authentication method can specify either an OAuth.We will support 1 type of authorization: - oauthoauthYes
client_idTaboo Account Client IDStringYes
client_secretTaboo Account Client SecretStringYes
account_idThe Account ID of the Taboola Application.StringYes
audience_nameA unique name for the audience. If an existing audience_name is used, the server returns the existing audience instead of creating a new one.StringYes
ttl_in_hoursTime-to-live in hours for how long users stay in the audience. Defaults to 8,760 (1 year) if omitted.Integer8760No
operationThe operation to export data. There are 2 options Add / Remove.String We support 2 operations: - add - removeaddNo
skip_invalid_recordsEnable skipping the invalid records.BooleantrueNo
batch_sizeBatch size for sending users each batch.Integer. From 1 - 100000100000No

Example of Usage

Authentication with OAuth

out:  type: taboola  auth_method: oauth  client_id: xxxxxxxx  client_secret: xxxxxxxx  ...

Add Users to Audience

out:  type: taboola  auth_method: oauth  client_id: xxxxxx  client_secret: xxxxxx  account_id: acount_id  audience_name: audience_name  operation: add  skip_invalid_records: true  batch_size: 100000

Remove Users from Audience

out:  type: taboola  auth_method: oauth  client_id: xxxxxx  client_secret: xxxxxx  account_id: acount_id  audience_name: audience_name  operation: remove  skip_invalid_records: true  batch_size: 100000

See Also