<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Using an Application Automation to serve as an Advanced Analytics Connector in Member Articles</title>
    <link>https://community.qlik.com/t5/Member-Articles/Using-an-Application-Automation-to-serve-as-an-Advanced/ta-p/2438614</link>
    <description>&lt;H3&gt;My Catch 22&lt;/H3&gt;
&lt;P&gt;So here was the situation I was facing, my boss was screaming at me to do something that didn't exist so I ... alright truth be told he was never screaming at me and he was fine with the initial work around I came up with. I was the one screaming to try and connect to the Google Gemini Pro #LLM in the same Server Side Extension manner I had been for other Large Language Models. I wanted to be able to ask a question and get a response, but also have the response be responsive if I filtered selections in the data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is that the API for Google Gemini Pro expects a nested block of JSON, and the generic Advanced Analytics Connector only sends a basic JSON block with field/value pairs. But my hero, Daniel Pilla, helped me realize that a Qlik Application Automation will accept the basic JSON field/value pair block and that I could then infuse the question and data into the URL call as needed for the Google Gemini Pro API.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Feel free to watch the video and skip all of the yapping I do after it. Or if you think it might be helpful and actually want to try, feel free to read the step by step instructions to give it a try on your end.&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Video&lt;/H3&gt;
&lt;P&gt;&lt;div class="video-embed-center video-embed"&gt;&lt;iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F5Ko0w94sejM%3Ffeature%3Doembed&amp;amp;display_name=YouTube&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D5Ko0w94sejM&amp;amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F5Ko0w94sejM%2Fhqdefault.jpg&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube" width="640" height="360" scrolling="no" title="Application Automations for Advanced Analytics Connectors" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Yapping with Step by Step Instruction&lt;/H3&gt;
&lt;P&gt;To test let’s create a brand new Qlik Application Automation&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_1-1712429182941.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163580iF115D86B450C4499/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_1-1712429182941.png" alt="Dalton_Ruer_1-1712429182941.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be sure to set the Start block to Triggered and keep a copy of the information that it will display for you as to how to call the automation you will need that when creating the Advanced Analytics Connector inside of Qlik Sense momentarily.&lt;/P&gt;
&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dalton_Ruer_2-1712429182947.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163579i6D45D6E020032EF1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_2-1712429182947.png" alt="Dalton_Ruer_2-1712429182947.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then add an Output block that will simply output “Yeah I did something”&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_3-1712429182954.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163578iF1B7892DD97D9CD5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_3-1712429182954.png" alt="Dalton_Ruer_3-1712429182954.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Create a new Qlik Sense application and go to the Load Script.&lt;/P&gt;
&lt;P&gt;Before adding our Advanced Analytics connector we need to add some sample data to our load script to test with:&lt;/P&gt;
&lt;P&gt;Data:&lt;/P&gt;
&lt;P&gt;Load * Inline [&lt;/P&gt;
&lt;P&gt;Question#, Prompt&lt;/P&gt;
&lt;P&gt;Question 1, "Human: What can you tell me about the Qlik Associative Model and why customers love it so much? Assistant:"&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Choose Create new connection and then choose Advanced Analytics&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_4-1712429182955.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163583i3715AF929A6221A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_4-1712429182955.png" alt="Dalton_Ruer_4-1712429182955.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Simply copy the URL from the Automation you just created, and then create a HTTP Headers entry for X-Execution-Token as shown and the token provided.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_5-1712429182958.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163582iBE65B79D2969279D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_5-1712429182958.png" alt="Dalton_Ruer_5-1712429182958.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In the Response Table section simply input any table name value you wish for the Name of Returned Table and uncheck the box that says Load all available fields, and set the Table Field (JMESPath) to response and response.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_6-1712429182960.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163581i7826858E67DB4E67/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_6-1712429182960.png" alt="Dalton_Ruer_6-1712429182960.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You will see why based on the data in a second but for now just enter Question# as the Association Field and be sure the Send Association Field box is not checked:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_7-1712429182961.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163585i4138F16D08B87C36/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_7-1712429182961.png" alt="Dalton_Ruer_7-1712429182961.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Save your newly created Advanced Analytics connector.&lt;/P&gt;
&lt;P&gt;Now choose the Select Data icon for your Advanced Analytics test connection&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_8-1712429182966.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163584iCD373D9B43B7F505/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_8-1712429182966.png" alt="Dalton_Ruer_8-1712429182966.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;After you type in the name of our sample data table “Data” the connector will then show you what information will be returned. Notice in my image it’s the AnyNameYouWant table because that is literally what I input, your screen will contain the name you used.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_9-1712429182969.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163586iC079014F63B63BBC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_9-1712429182969.png" alt="Dalton_Ruer_9-1712429182969.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Run the load script and you will see that you sent 1 row and you got 1 row back:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_10-1712429182971.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163589i266A4224A145F10A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_10-1712429182971.png" alt="Dalton_Ruer_10-1712429182971.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Keep in mind that we didn’t do anything special in our Qlik Application Automation yet, we are simply using this as a test to understand HOW the Advanced Analytics Connector works. So let’s go over to the Qlik Application Automation you created and see what we learned.&lt;/P&gt;
&lt;P&gt;Click on your Output block and delete the “Yeah I did something” text that was being output previously:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_11-1712429182973.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163587i33E6327316C8C870/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_11-1712429182973.png" alt="Dalton_Ruer_11-1712429182973.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now from the dropdown for Data to output choose the right arrow icon for Output from start because we want to see what it actually contains:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_12-1712429182979.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163588i4F5A52145E3CE5C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_12-1712429182979.png" alt="Dalton_Ruer_12-1712429182979.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Not surprisingly it shows us that it received a simple record. Now click the Toggle view mode icon so that you can see what I mentioned at the onset. It is the very simple JSON block with a simple field/value pair that is passed in:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_22-1712429675958.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163599i625FA925481C395A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_22-1712429675958.png" alt="Dalton_Ruer_22-1712429675958.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;With that knowledge untoggled the View mode so we see the array instead and type &lt;BR /&gt;“You asked for: ” then click the Prompt field and choose Select first item from list. (While you saw it knows we only passed 1 entry, it assumes the body can be an array. So we need to select the first one, which is all we would ever pass it.)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_14-1712429182982.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163592i21AE142B765DAA39/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_14-1712429182982.png" alt="Dalton_Ruer_14-1712429182982.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_15-1712429182984.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163591iF5834685A947A6A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_15-1712429182984.png" alt="Dalton_Ruer_15-1712429182984.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Instead of calling the automation from the load script again, lets build a simple Analytics sheet instead.&lt;/P&gt;
&lt;P&gt;Simply add a Text &amp;amp; Image chart to your new sheet.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_16-1712429182984.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163595i9E3553146A8FBA3C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_16-1712429182984.png" alt="Dalton_Ruer_16-1712429182984.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now add a measure&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_17-1712429182985.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163594i7AE89FEE994715BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_17-1712429182985.png" alt="Dalton_Ruer_17-1712429182985.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And use the following string as your expression. The connectionname you use is the one you created and you can copy it right from the load script if needed to ensure you have spelling and spacing correct:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_18-1712429182987.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163593i860B3F27F402A917/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_18-1712429182987.png" alt="Dalton_Ruer_18-1712429182987.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Your measure expression should be:&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;endpoints.ScriptEvalStr('{"RequestType":"endpoint", "endpoint":{"connectionname":"Advanced_Analytics"}}', 'Tell me a dad joke' as Prompt, 'Qlik Dork' as UserName)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The measure we added is evaluated and our Text &amp;amp; Image Chart now contains the response from our Automation:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_19-1712429182988.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163596i6C45D0AD8ADB241A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_19-1712429182988.png" alt="Dalton_Ruer_19-1712429182988.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now let’s go back to the Automation and take another look at it. We know we were just forcing the Output value, it’s the Start block that we care about. Notice that now the Start block had a plain JSON body with both fields.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_20-1712429182990.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163597i3760D36105348DD3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_20-1712429182990.png" alt="Dalton_Ruer_20-1712429182990.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now let’s add a Table object to our screen. Add the Question# and the Prompt as dimensions. Then add a measure with the following expression:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;endpoints.ScriptEvalStr('{"RequestType":"endpoint", "endpoint":{"connectionname":"Advanced_Analytics"}}', Prompt)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Yeah … we can call our Automation as an SSE style Advanced Analytics connector and we know that we can pass fields from our actual data, or made up values as needed.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_21-1712429182993.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163598i28F1C423D32BE2D6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_21-1712429182993.png" alt="Dalton_Ruer_21-1712429182993.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H3&gt;Summary&lt;/H3&gt;
&lt;P&gt;We know there is nothing super exciting about getting a return value that repeats your question. But this post is just the foundation for you to build upon, which is exactly what I did and what I refer to in my video. Who knows what you may try and utilize the Advanced Analytics Connector for and when you encounter a red screen error or something you will know just what the issue may be.&lt;/P&gt;
&lt;P&gt;On my end, one Dan helped me know&amp;nbsp;I could call my Application Automation from an Advanced Analytics Connector, the rest of my problem was resolved quickly. All I simply had to do was add the simple basic URL block to my automation and call the Google Gemini Pro API.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_23-1712430309229.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163601iEA38A5AC34F8B7D9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_23-1712430309229.png" alt="Dalton_Ruer_23-1712430309229.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In a similar fashion to what it expects, their API returns a nested block. I was able to pull that value out and return it as the result.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_24-1712430439008.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163602i95C1EAE884053A77/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_24-1712430439008.png" alt="Dalton_Ruer_24-1712430439008.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 06 Apr 2024 19:11:57 GMT</pubDate>
    <dc:creator>Dalton_Ruer</dc:creator>
    <dc:date>2024-04-06T19:11:57Z</dc:date>
    <item>
      <title>Using an Application Automation to serve as an Advanced Analytics Connector</title>
      <link>https://community.qlik.com/t5/Member-Articles/Using-an-Application-Automation-to-serve-as-an-Advanced/ta-p/2438614</link>
      <description>&lt;H3&gt;My Catch 22&lt;/H3&gt;
&lt;P&gt;So here was the situation I was facing, my boss was screaming at me to do something that didn't exist so I ... alright truth be told he was never screaming at me and he was fine with the initial work around I came up with. I was the one screaming to try and connect to the Google Gemini Pro #LLM in the same Server Side Extension manner I had been for other Large Language Models. I wanted to be able to ask a question and get a response, but also have the response be responsive if I filtered selections in the data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is that the API for Google Gemini Pro expects a nested block of JSON, and the generic Advanced Analytics Connector only sends a basic JSON block with field/value pairs. But my hero, Daniel Pilla, helped me realize that a Qlik Application Automation will accept the basic JSON field/value pair block and that I could then infuse the question and data into the URL call as needed for the Google Gemini Pro API.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Feel free to watch the video and skip all of the yapping I do after it. Or if you think it might be helpful and actually want to try, feel free to read the step by step instructions to give it a try on your end.&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Video&lt;/H3&gt;
&lt;P&gt;&lt;div class="video-embed-center video-embed"&gt;&lt;iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F5Ko0w94sejM%3Ffeature%3Doembed&amp;amp;display_name=YouTube&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D5Ko0w94sejM&amp;amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F5Ko0w94sejM%2Fhqdefault.jpg&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube" width="640" height="360" scrolling="no" title="Application Automations for Advanced Analytics Connectors" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Yapping with Step by Step Instruction&lt;/H3&gt;
&lt;P&gt;To test let’s create a brand new Qlik Application Automation&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_1-1712429182941.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163580iF115D86B450C4499/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_1-1712429182941.png" alt="Dalton_Ruer_1-1712429182941.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be sure to set the Start block to Triggered and keep a copy of the information that it will display for you as to how to call the automation you will need that when creating the Advanced Analytics Connector inside of Qlik Sense momentarily.&lt;/P&gt;
&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dalton_Ruer_2-1712429182947.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163579i6D45D6E020032EF1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_2-1712429182947.png" alt="Dalton_Ruer_2-1712429182947.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then add an Output block that will simply output “Yeah I did something”&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_3-1712429182954.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163578iF1B7892DD97D9CD5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_3-1712429182954.png" alt="Dalton_Ruer_3-1712429182954.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Create a new Qlik Sense application and go to the Load Script.&lt;/P&gt;
&lt;P&gt;Before adding our Advanced Analytics connector we need to add some sample data to our load script to test with:&lt;/P&gt;
&lt;P&gt;Data:&lt;/P&gt;
&lt;P&gt;Load * Inline [&lt;/P&gt;
&lt;P&gt;Question#, Prompt&lt;/P&gt;
&lt;P&gt;Question 1, "Human: What can you tell me about the Qlik Associative Model and why customers love it so much? Assistant:"&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Choose Create new connection and then choose Advanced Analytics&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_4-1712429182955.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163583i3715AF929A6221A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_4-1712429182955.png" alt="Dalton_Ruer_4-1712429182955.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Simply copy the URL from the Automation you just created, and then create a HTTP Headers entry for X-Execution-Token as shown and the token provided.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_5-1712429182958.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163582iBE65B79D2969279D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_5-1712429182958.png" alt="Dalton_Ruer_5-1712429182958.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In the Response Table section simply input any table name value you wish for the Name of Returned Table and uncheck the box that says Load all available fields, and set the Table Field (JMESPath) to response and response.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_6-1712429182960.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163581i7826858E67DB4E67/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_6-1712429182960.png" alt="Dalton_Ruer_6-1712429182960.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You will see why based on the data in a second but for now just enter Question# as the Association Field and be sure the Send Association Field box is not checked:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_7-1712429182961.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163585i4138F16D08B87C36/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_7-1712429182961.png" alt="Dalton_Ruer_7-1712429182961.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Save your newly created Advanced Analytics connector.&lt;/P&gt;
&lt;P&gt;Now choose the Select Data icon for your Advanced Analytics test connection&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_8-1712429182966.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163584iCD373D9B43B7F505/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_8-1712429182966.png" alt="Dalton_Ruer_8-1712429182966.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;After you type in the name of our sample data table “Data” the connector will then show you what information will be returned. Notice in my image it’s the AnyNameYouWant table because that is literally what I input, your screen will contain the name you used.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_9-1712429182969.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163586iC079014F63B63BBC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_9-1712429182969.png" alt="Dalton_Ruer_9-1712429182969.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Run the load script and you will see that you sent 1 row and you got 1 row back:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_10-1712429182971.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163589i266A4224A145F10A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_10-1712429182971.png" alt="Dalton_Ruer_10-1712429182971.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Keep in mind that we didn’t do anything special in our Qlik Application Automation yet, we are simply using this as a test to understand HOW the Advanced Analytics Connector works. So let’s go over to the Qlik Application Automation you created and see what we learned.&lt;/P&gt;
&lt;P&gt;Click on your Output block and delete the “Yeah I did something” text that was being output previously:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_11-1712429182973.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163587i33E6327316C8C870/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_11-1712429182973.png" alt="Dalton_Ruer_11-1712429182973.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now from the dropdown for Data to output choose the right arrow icon for Output from start because we want to see what it actually contains:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_12-1712429182979.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163588i4F5A52145E3CE5C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_12-1712429182979.png" alt="Dalton_Ruer_12-1712429182979.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Not surprisingly it shows us that it received a simple record. Now click the Toggle view mode icon so that you can see what I mentioned at the onset. It is the very simple JSON block with a simple field/value pair that is passed in:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_22-1712429675958.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163599i625FA925481C395A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_22-1712429675958.png" alt="Dalton_Ruer_22-1712429675958.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;With that knowledge untoggled the View mode so we see the array instead and type &lt;BR /&gt;“You asked for: ” then click the Prompt field and choose Select first item from list. (While you saw it knows we only passed 1 entry, it assumes the body can be an array. So we need to select the first one, which is all we would ever pass it.)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_14-1712429182982.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163592i21AE142B765DAA39/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_14-1712429182982.png" alt="Dalton_Ruer_14-1712429182982.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_15-1712429182984.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163591iF5834685A947A6A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_15-1712429182984.png" alt="Dalton_Ruer_15-1712429182984.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Instead of calling the automation from the load script again, lets build a simple Analytics sheet instead.&lt;/P&gt;
&lt;P&gt;Simply add a Text &amp;amp; Image chart to your new sheet.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_16-1712429182984.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163595i9E3553146A8FBA3C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_16-1712429182984.png" alt="Dalton_Ruer_16-1712429182984.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now add a measure&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_17-1712429182985.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163594i7AE89FEE994715BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_17-1712429182985.png" alt="Dalton_Ruer_17-1712429182985.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And use the following string as your expression. The connectionname you use is the one you created and you can copy it right from the load script if needed to ensure you have spelling and spacing correct:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_18-1712429182987.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163593i860B3F27F402A917/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_18-1712429182987.png" alt="Dalton_Ruer_18-1712429182987.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Your measure expression should be:&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;endpoints.ScriptEvalStr('{"RequestType":"endpoint", "endpoint":{"connectionname":"Advanced_Analytics"}}', 'Tell me a dad joke' as Prompt, 'Qlik Dork' as UserName)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The measure we added is evaluated and our Text &amp;amp; Image Chart now contains the response from our Automation:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_19-1712429182988.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163596i6C45D0AD8ADB241A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_19-1712429182988.png" alt="Dalton_Ruer_19-1712429182988.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now let’s go back to the Automation and take another look at it. We know we were just forcing the Output value, it’s the Start block that we care about. Notice that now the Start block had a plain JSON body with both fields.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_20-1712429182990.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163597i3760D36105348DD3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_20-1712429182990.png" alt="Dalton_Ruer_20-1712429182990.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now let’s add a Table object to our screen. Add the Question# and the Prompt as dimensions. Then add a measure with the following expression:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;endpoints.ScriptEvalStr('{"RequestType":"endpoint", "endpoint":{"connectionname":"Advanced_Analytics"}}', Prompt)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Yeah … we can call our Automation as an SSE style Advanced Analytics connector and we know that we can pass fields from our actual data, or made up values as needed.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_21-1712429182993.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163598i28F1C423D32BE2D6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_21-1712429182993.png" alt="Dalton_Ruer_21-1712429182993.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H3&gt;Summary&lt;/H3&gt;
&lt;P&gt;We know there is nothing super exciting about getting a return value that repeats your question. But this post is just the foundation for you to build upon, which is exactly what I did and what I refer to in my video. Who knows what you may try and utilize the Advanced Analytics Connector for and when you encounter a red screen error or something you will know just what the issue may be.&lt;/P&gt;
&lt;P&gt;On my end, one Dan helped me know&amp;nbsp;I could call my Application Automation from an Advanced Analytics Connector, the rest of my problem was resolved quickly. All I simply had to do was add the simple basic URL block to my automation and call the Google Gemini Pro API.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_23-1712430309229.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163601iEA38A5AC34F8B7D9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_23-1712430309229.png" alt="Dalton_Ruer_23-1712430309229.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In a similar fashion to what it expects, their API returns a nested block. I was able to pull that value out and return it as the result.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Dalton_Ruer_24-1712430439008.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163602i95C1EAE884053A77/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dalton_Ruer_24-1712430439008.png" alt="Dalton_Ruer_24-1712430439008.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Apr 2024 19:11:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Member-Articles/Using-an-Application-Automation-to-serve-as-an-Advanced/ta-p/2438614</guid>
      <dc:creator>Dalton_Ruer</dc:creator>
      <dc:date>2024-04-06T19:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using an Application Automation to serve as an Advanced Analytics Connector</title>
      <link>https://community.qlik.com/t5/Member-Articles/Using-an-Application-Automation-to-serve-as-an-Advanced/tac-p/2459426#M2183</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/49457"&gt;@Dalton_Ruer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Great work. This is a game-changing work that you have created.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have also tried some of your work like "Calling Google Gemini Pro from within Qlik Sense".&lt;/P&gt;
&lt;P&gt;sharing link of your video&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=xGFqUO7CECQ" target="_blank"&gt;Calling Google Gemini Pro from within Qlik Sense (youtube.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If possible can you please make a detailed article on this above video link for how we can work with objects or charts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 11:19:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Member-Articles/Using-an-Application-Automation-to-serve-as-an-Advanced/tac-p/2459426#M2183</guid>
      <dc:creator>Dyro04</dc:creator>
      <dc:date>2024-06-05T11:19:29Z</dc:date>
    </item>
  </channel>
</rss>

