Tutorial – Using the OpenAI analytics connector in Qlik Cloud
This tutorial teaches you how to work with the OpenAI analytics connector to enhance your Qlik Sense apps with contextual depth from generative AI models.
You can integrate your OpenAI analytic connection directly into your data model so that data generated by it is pre-loaded into the app. Alternatively, you can use it in chart expressions. The tutorial shows you how to get set up for working with the connector, and how to create connections to the connector in Qlik Cloud. From there, it guides you through basic examples of how to incorporate the functionality into your Qlik Sense apps.
The examples in this tutorial can also be used for working with the Azure OpenAI analytics connector.
Interactive sheet showing how the OpenAI connector can be used to enhance analytics content

Set up your OpenAI platform account and Qlik Cloud environment
Before you can work with the OpenAI analytics connector, you need to complete several steps. These include:
-
Create an OpenAI platform account
-
Obtain an OpenAI API key
-
Enable analytic connection functionality in Qlik Cloud
For full details, see Getting started with the OpenAI platform.
Create the connections
Create two connections to the OpenAI analytics connector, both using the OpenAI Chat Completions API configuration. Once you have created the connections, you are ready to start working directly with the OpenAI platform through the load script or in chart objects.
The connections will be used as follows:
-
First connection: Used for Examples – Creating load scripts and chart expressions for the OpenAI analytics connector.
-
Second connection: Used for OpenAI analytics connector – Interactive example.
Do the following:
-
Create two new connections, one by one, to OpenAI from the Data load editor or from the Create page in the Analytics activity center. In the Data load editor, the OpenAI connector is found under Analytics sources.
-
Select the Configuration to use. For both connections in this tutorial, use the OpenAI Chat Completions API configuration.
-
Authenticate yourself on the connection by entering the OpenAI API key you generated in the preparations section of this tutorial.
-
Adjust the default parameter values to suit your needs.
Information noteYou will almost always need to alter the Max Tokens parameter value in order for the connection to function properly for your needs. This parameter controls the size of the response that will be generated. -
Add an Association Field to link the connection output to the data model of one or your apps:
-
For the first connection, enter RowId as the Association Field.
-
For the second connection, leave the Association Field blank.
-
-
For the Name parameter, enter a distinct name value for each connection you create. You will need to use these parameter values when working in the load script or with chart expressions.
For the purposes of the tutorial examples, use the following:
-
Use the name OpenAI_Examples_Intro for examples on Examples – Creating load scripts and chart expressions for the OpenAI analytics connector.
-
Use the name OpenAI_Example_InteractiveApp for examples on OpenAI analytics connector – Interactive example.
-
-
Click Create.
Examples
Once you have created the connection with this configuration, you can use it in your load script and in chart expressions to communicate with OpenAI models.
These examples are designed to be stand-alone and can be completed independently of one another.