Use the CData ODBC Driver for MailerSend in Microsoft Power Query

Jerod Johnson
Jerod Johnson
Director, Technology Evangelism
You can use the CData MailerSend ODBC Driver with Microsoft Power Query. In this article, you will use the ODBC driver to import MailerSend data into Microsoft Power Query.

The CData ODBC Driver for MailerSend enables you to link to MailerSend data in Microsoft Power Query, ensuring that you see any updates. This article details how to use the ODBC driver to import MailerSend data into Microsoft Power Query.

Connect to MailerSend as an ODBC Data Source

If you have not already, first specify connection properties in an ODBC DSN (data source name). This is the last step of the driver installation. You can use the Microsoft ODBC Data Source Administrator to create and configure ODBC DSNs.

The MailerSend API uses API Key authentication via a Bearer token in the Authorization request header.

Using API Key Authentication

Your MailerSend API token is required to create a connection. To obtain your API token:

  1. Log into your MailerSend account at app.mailersend.com.
  2. Navigate to Settings > API Tokens in your account dashboard.
  3. Click Generate new token, provide a name and select the appropriate permissions.
  4. Copy the generated API token.

After obtaining your API token, set the following connection properties:

  • AuthScheme: Set this to APIKey.
  • APIKey: Set this to your MailerSend API token.

Example connection string:

Profile=C:\profiles\Mailersend.apip;AuthScheme=APIKey;ProfileSettings='APIKey=your_api_token';

Import MailerSend Data

Follow the steps below to import MailerSend data using standard SQL:

  1. From the ribbon in Excel, click Power Query -> From Other Data Sources -> From ODBC.

  2. Enter the ODBC connection string. Below is a connection string using the default DSN created when you install the driver:
    Provider=MSDASQL.1;Persist Security Info=False;DSN=CData API Source
  3. Enter the SELECT statement to import data with. For example:

        SELECT ,  FROM Activity WHERE DomainId = 'domain123'
        
  4. Enter credentials, if required, and click Connect. The results of the query are displayed in the Query Editor Preview. You can combine queries from other data sources or refine the data with Power Query formulas. To load the query to the worksheet, click the Close and Load button.

Ready to get started?

Connect to live data from MailerSend with the API Driver

Connect to MailerSend