Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
May 28, 2025 10:20:21 AM
Jun 20, 2023 3:52:07 PM
This article provides an overview to get started with the OpenAI connector in Qlik Automate.
The OpenAI connector offers developers a range of powerful natural language processing capabilities. It allows for tasks such as text generation, translating between languages, analyzing sentiment, summarizing content, and building question-answering systems. These features enable you to bring additional value to your existing automations.
Content:
Create a new automation and search for the OpenAI connector in the block library on the left side. Drag a block inside the automation editor canvas, and make sure to select the block to show the block configuration menu on the right side of the editor. Open the Connect tab in the configuration menu and provide your OpenAI API key. Visit your API Keys page to retrieve the API key you'll use in your requests.
Once the connection to your OpenAI account has been created, you can start building an automation that uses the connector.
The available blocks are:
For more details on the API, please refer to the following link.
At the time of writing this article, the Images and Audio endpoints in the OpenAI API are in beta state but can be used through the Raw API Request blocks.
This use case is based on the existing template "Analyze support ticket sentiment with Expert.ai". In this template, Expert.ai is used to predict the sentiment of new support tickets from ServiceNow. If the sentiment is deemed too negative, the automation will send an alert to a Microsoft Teams channel to inform the support team about the incident. For convenience, we'll leave out the write to MySQL and app reload part of the original template.
If you want, you could also use OpenAI to predict the sentiment instead of Expert.ai. But keep in mind that this could provide a less accurate result since the Expert.ai.
Below are a couple of tips and limitations to keep in mind when working with the OpenAI connector in automations.
{
"error": {
"message": "You exceeded your current quota, please check your plan and billing details.",
"type": "insufficient_quota",
"param": null,
"code": null
}
}
Create completion block: The model parameter, the only required parameter in this block, allows us to produce a random answer. A minimum prerequisite for a more insightful response is a model, prompt, and Max Tokens input parameter. Other input variables may be employed to narrow down the response.
Write a summary of the following data.
<|endoftext|>
Country | Population
------- | --------
United States | 329.5 million
China | 1.444 billion
India | 1.38 billion
Completion:
This data shows the population of three of the largest countries in the world. The United States has a population of 329.5 million, China has a population of 1.444 billion, and India has a population of 1.38 billion. Max Tokens: Specifies the maximum number of tokens in the generated completion response. More information about how the token count is calculated by OpenAI can be found here: Tokenizer.
Example:50The following parameters are optional in most use cases but could be used to fine-tune the response:
0.6top_p (or nucleus) selects the most likely tokens until the cumulative probability exceeds the threshold. 0.8320.60.45"12345"Hello,
First, thank you for the article.
I am currently working on the subject and I notice that some new blocks are now availables, like :
- Chat Completion
- Chat Completion Message
- Chat Completion Function
Any chance to find an article about this ?
Thank you
Regards,
Antoine L.
@Antoine04 We don't have the article at the moment for the above blocks.
Hello to both of you,
Thanks for reply. Can't wait to see it !
I have to say I already try it and it works in my case, but would be nice to have the best practices on how to configure it 🙂
Regards
I'm wondering if a new article or documentation update about the new OpenAI blocks in Automate will be published soon. I haven't been able to find any recent information, and I'm currently running into an issue where either the endpoint isn't recognized, or the variable for the Chat Completion block isn't being populated correctly.
Kind regards,
Michiel