Use the CData ODBC Driver for Gumroad in Microsoft Power Query
The CData ODBC Driver for Gumroad enables you to link to Gumroad data in Microsoft Power Query, ensuring that you see any updates. This article details how to use the ODBC driver to import Gumroad data into Microsoft Power Query.
Connect to Gumroad 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.
Using OAuth Authentication
To authenticate to Gumroad and connect to your own data or to allow other users to connect to their data, you can use the OAuth 2.0 standard. This is the recommended authentication method.
First you need to register an OAuth application with Gumroad. You can create an OAuth application by visiting your Gumroad account settings at https://app.gumroad.com/settings/advanced and navigating to the Applications section.
After setting the following connection properties, you are ready to connect:
- AuthScheme: Set this to OAuth.
- InitiateOAuth: Set this to GETANDREFRESH. The CData API Profile for Gumroad will automatically walk through the OAuth process in order to obtain the access token.
- OAuthClientID: Set this to the client_id that is specified in your app settings.
- OAuthClientSecret: Set this to the client_secret that is specified in your app settings.
- CallbackURL: Set this to the Redirect URI you specified in your app settings.
Example connection string
Profile=C:\profiles\Gumroad.apip;AuthScheme=OAuth;InitiateOAuth=GETANDREFRESH;OAuthClientId=your_client_id;OAuthClientSecret=your_client_secret;CallbackUrl=your_callback_url;
Import Gumroad Data
Follow the steps below to import Gumroad data using standard SQL:
-
From the ribbon in Excel, click Power Query -> From Other Data Sources -> From ODBC.
- 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
-
Enter the SELECT statement to import data with. For example:
SELECT , FROM CustomFields WHERE ProductId = 'prod_abc123xyz'
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.
