Learn more about EmberPoint MailPublisher Import Integration.
This integration allows Treasure Data to publish segments into the EmberPoint MailPublisher, enabling the user to send personalized emails. You can run data-driven email campaigns using your first-party data from the Web, Mobile, or CRM.
This connector can also be used to import MailPublisher data into Treasure Data.
MailPublisher Smart has some restrictions for the column name in delivery list data:
The first column name must be "email"
Column name must not contain reserved words
- image_[number] e.g. image_001
- linkurl_[number] e.g. linkurl_001
- cvurl_[number] e.g. cvurl_001
- boundary[number] e.g. boundary00
- carrier_type
- code_mini
Column name must not contain the characters given below
- "-" (hyphen) and " " (space)
Column value can't contain a "," (comma), '"' (double quote) and a new line (CR/LF/CRLF) for now.
Column value must not contain special characters such as IBM extended (ja: IBM拡張), NEC extended kanji (ja: NEC拡張漢字), or number enclosed within a circle (ja: 丸数字) like ①.
The email string in column value must have a valid format. Invalid formatted email addresses will be removed when you upload the email delivery list.
The uploaded file will be encoded with the Shift_JIS character encoding when you choose "Japan" as the destination. Some of the text might get jumbled.
Refer to the "MailPublisher Smart manual to cooperate with the external system (ja: 外部システムとの連携利用マニュアル)" and the "MailPublisher Smart function manual (ja: 機能説明マニュアル)". You can download both from the MailPublisher Smart console.
- Basic knowledge of Treasure Data, including the Toolbelt.
- A MailPublisher Smart Account with enabled API access (done via MailPublisher Smart Console).
- This connector doesn't support a custom endpoint. It only supports the default endpoint.
Access to your API-enabled account is required before you can upload the email delivery list. The Site ID can be retrieved from the MailPublisher Smart console.
Steps to enable and create a new account for API access:
Select Account > Create (ja: アカウント > 新規作成) in the left menu
Create an external system cooperation type User (ja: 利用種別:外部システム連携).

To use "send_email" option, you need to get a draft ID which can be found as shown below (メール配信・一覧 > 下書きメール).


When you configure a data connection, you provide authentication to access the integration. In Treasure Data, you configure the authentication and then specify the source information.
Open the TD Console.
Navigate to the Integrations Hub > Catalog.
Click the search icon on the far-right of the Catalog screen, and enter Mailpublisher.
Hover over the MailPublisher connector and select Create Authentication.

The following dialog opens.

Complete the new connection information, providing your MailPublisher Smart credential.
MailPublisher Smart Site ID (required): This is your MailPublisher Smart Site ID.
MailPublisher Smart Login ID (required): This is service specific Login ID.
MailPublisher Smart password (required): This is password for above Login ID.
Retry limit (optional, default
7): Number of retries before the connector stops trying to connect and send data outMaximum intervals in milliseconds between retries (optional, default to
120000) : Maximum time in milliseconds between retrying attempts.Initial intervals in milliseconds between retries (optional, default
15000): Interval to retry if a recoverable error happens (in millisecond).- MailPublisher Smart announces minimal retry interval time should be 15 sec (15000 ms).
Timeout (optional, default to
100000) : Timeout for each HTTP request in milliseconds.
- Type a name for your connection.
- Select Done.
The column name is case-insensitive. For example, you can use
emailorEMAIL.Example Query
- Navigate to Data Workbench > Queries.
- Select New Query or search for the query you want to use.
- Review the following sample queries:
SELECT
email,
td_global_id as tdglobalid,
firstname,
lastname,
company
FROM (
VALUES
('name+test1@treasure-data.com', 'b1b065f5-1222-4a14-b151-379d49ec39e3', 'John', 'Doe', 'MailPublisher Dummy Data - DO NOT USE'),
('name+test2@treasure-data.com', 'x1b065f5-1222-4a14-b151-379d49ec39e3', 'Janes', 'Doe', 'MailPublisher Dummy Data - DO NOT USE'),
('name+test3@treasure-data.com', 'p1b065f5-1222-4a14-b151-379d49ec39e3', 'Tony', 'Doe', 'MailPublisher Dummy Data - DO NOT USE'),
('name+test4@treasure-data.com', 'o1b065f5-1222-4a14-b151-379d49ec39e3', 'Bill', 'Adam', 'MailPublisher Dummy Data - DO NOT USE'),
('name+test5@treasure-data.com', 't1b065f5-1222-4a14-b151-379d49ec39e3', 'Dan', 'Steve', 'MailPublisher Dummy Data- DO NOT USE')
) tbl
(
email,
td_global_id,
firstname,
lastname,
company
)or
SELECT
an_email_column AS email,
another_phone_column AS phone
FROM
your_table;- Select Export Results.
- Use an existing integration and select your MailPublisher connection.
- Complete the following parameter fields:
Action mode:
- list_upload: Upload a distribution list
- send_email: Book an email delivery in addition to uploading the list.
Email delivery destination:
- Japan or Worldwide
- If the destination is "Japan". the uploaded file is encoded with Shift_JIS character encoding. Else the file is encoded with UTF-8.
File name prefix: (optional, default: "delivery_list_") : The uploaded file will have this prefix in its file name.
Draft ID: (required with "send_email" mode) ID of the draft to use for email delivery. This can be checked on the MailPublisher console.
List ID: (optional) : ID of the file which will override the data.
Use immediate email delivery: Check if you want to send an email immediately
- Be careful when using this option, email delivery settings cannot be tested at this stage.
Booking date time: (required unless "immediate delivery" mode) Sends an email. The email is sent out at least 10 minutes after the output job is run. Its format must be "YYYY-MM-DD HH:mm" such as "2018-09-18 12:00"
Booking timezone: Timezone for booking date time.
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.
Navigate to Data Workbench > Queries
Create a new query or select an existing query.
Next to Schedule, select None.

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

Drop-down Value Description 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. None No schedule.

| Cron Value | Description |
|---|---|
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 Value | Example | Example 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. |
- (Optional) You can delay the start time of a query by enabling the Delay execution.
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.
- Review results in the MailPublisher Smart Console for your new email delivery list.
Within Treasure Workflow, you can specify the use of this data connector to export data.
Learn more at Exporting Data with Parameters.