Discover how a bimodal integration strategy can address the major data management challenges facing your organization today.
Get the Report →Integrate HubDB Data into Automated Tasks with Power Automate
Use CData Connect Server to create a virtual SQL Server database for HubDB data and integrate live HubDB data into your Power Automate (Microsoft Flow) tasks.
Power Automate (Microsoft Flow) is an online service that automates events (known as workflows) across the most common apps and services. When paired with CData Connect Server, you get instant, cloud-to-cloud access to HubDB data for visualizations, dashboards, and more. This article shows how to connect to Connect Server from Power Automate and integrate live HubDB data into your workflows and tasks.
CData Connect Server provides a pure SQL interface for HubDB, allowing you to easily integrate with live HubDB data in Power Automate — without replicating the data. CData Connect Server looks exactly like a SQL Server database to Power Automate and uses optimized data processing out of the box to push all supported SQL operations (filters, JOINs, etc) directly to HubDB, leveraging server-side processing to quickly return HubDB data.
Create a Virtual SQL Database for HubDB Data
CData Connect Server uses a straightforward, point-and-click interface to connect to data sources and generate APIs.
- Login to Connect Server and click Connections.
- Select "HubDB" from Available Data Sources.
-
Enter the necessary authentication properties to connect to HubDB.
There are two authentication methods available for connecting to HubDB data source: OAuth Authentication with a public HubSpot application and authentication with a Private application token.
Using a Custom OAuth App
AuthScheme must be set to "OAuth" in all OAuth flows. Be sure to review the Help documentation for the required connection properties for you specific authentication needs (desktop applications, web applications, and headless machines).
Follow the steps below to register an application and obtain the OAuth client credentials:
- Log into your HubSpot app developer account.
- Note that it must be an app developer account. Standard HubSpot accounts cannot create public apps.
- On the developer account home page, click the Apps tab.
- Click Create app.
- On the App info tab, enter and optionally modify values that are displayed to users when they connect. These values include the public application name, application logo, and a description of the application.
- On the Auth tab, supply a callback URL in the "Redirect URLs" box.
- If you're creating a desktop application, set this to a locally accessible URL like http://localhost:33333.
- If you are creating a Web application, set this to a trusted URL where you want users to be redirected to when they authorize your application.
- Click Create App. HubSpot then generates the application, along with its associated credentials.
- On the Auth tab, note the Client ID and Client secret. You will use these later to configure the driver.
Under Scopes, select any scopes you need for your application's intended functionality.
A minimum of the following scopes is required to access tables:
- hubdb
- oauth
- crm.objects.owners.read
- Click Save changes.
- Install the application into a production portal with access to the features that are required by the integration.
- Under "Install URL (OAuth)", click Copy full URL to copy the installation URL for your application.
- Navigate to the copied link in your browser. Select a standard account in which to install the application.
- Click Connect app. You can close the resulting tab.
Using a Private App
To connect using a HubSpot private application token, set the AuthScheme property to "PrivateApp."
You can generate a private application token by following the steps below:
- In your HubDB account, click the settings icon (the gear) in the main navigation bar.
- In the left sidebar menu, navigate to Integrations > Private Apps.
- Click Create private app.
- On the Basic Info tab, configure the details of your application (name, logo, and description).
- On the Scopes tab, select Read or Write for each scope you want your private application to be able to access.
- A minimum of hubdb and crm.objects.owners.read is required to access tables.
- After you are done configuring your application, click Create app in the top right.
- Review the info about your application's access token, click Continue creating, and then Show token.
- Click Copy to copy the private application token.
To connect, set PrivateAppToken to the private application token you retrieved.
- Log into your HubSpot app developer account.
- Click Save Changes
- Click Privileges -> Add and add the new user (or an existing user) with the appropriate permissions.
Connecting to CData Connect Server
To use Connect Server to integrate HubDB data into your Power Automate tasks, you need a new SQL Server connection:
- Log in to Power Automate
- Click Data -> Connections -> New connection
- Select SQL Server
- In the connection wizard:
- Set Authentication Type to "SQL Server Authentication"
- Set SQL server name to the address of your Connect Server instance (connect_server_url)
- Set SQL database name to the name of the virtual HubDB database you created earlier (like hubdbdb)
- Set the Username and Password and click Create
Integrating HubDB Data into Power Automate Tasks
With the connection to Connect Server configured, you are ready to integrate live HubDB data into your Power Automate tasks.
- Log in to Power Automate
- Click My flows -> New and choose to create the flow from blank or template
- Add (or configure) a SQL Server action (like Get rows) and configure the action to connect to your Connect Server connection
- Select a Table to work with (from the drop-down menu) and configure any advanced options (like filters, orders, etc)
- Configure any actions to follow and test, then save the flow
SQL Access to HubDB Data from Applications
Now you have a direct connection to live HubDB data from Power Automate tasks. You can create more connections and workflows to drive business — all without replicating HubDB data.
To get SQL data access to 200+ SaaS, Big Data, and NoSQL sources directly from your applications, see the CData Connect Server.
Related Power Automate Articles
This article walks through using CData Connect Server with Power Automate (Online). Check out our other articles for more ways to work with Power Automate Desktop: