Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Jun 3, 2026 6:43:40 AM
Jun 3, 2026 6:43:40 AM
This article gives an overview of how to analyse failed app reloads with OpenAI using Qlik Automate, which is now available as a template.
This template is triggered when a Qlik Cloud app reload fails. It then analyzes the reload error with OpenAI and sends a Slack message with the app, space, reload details, and AI diagnosis. Session app and data preparation reloads are filtered out to focus on user-created script issues, keeping your alerts relevant and actionable.
This template is a good starting point if you want to:
The template is available on the template picker. You can find it by navigating to Add new -> New automation -> Search templates, searching for Diagnose failed app reloads with AI and notify your team on Slack in the search bar, and clicking the Use template option.
You will find a version of this automation attached to this article: "Diagnose-failed-app-reloads-with -AI-and-notify-your-team-on-Slack.json".
Content
When an analytics app reload fails, the automation:
The Slack message includes:
Before using this template, make sure you have access to:
This is the first block in the automation. It acts as the listener that starts the entire workflow.
How it works:
The block runs in webhook mode and listens for the App Reload Finished webhook event from the Qlik Cloud Services connector. The template uses an App ID guard in the event filter to prevent unnecessary webhook triggers: (App Ids eq "Specify_Your_App_Id_Here")
What you need to configure:
Event Filter: Pre-set to Reload status (A) as Failed (error) and Usage (B) as Analytics. Replace Specify_Your_App_Id_Here in the App Ids (C) parameter with your actual app Id during development.
When moving to production, either:
This block provides a second layer of filtering, specifically for session apps.
How it works:
Even though the App Reload Finished webhook event filter only includes analytics app reloads, session apps can still slip through because they share the Analytics usage type. This condition checks the app ID for the SessionApp_ prefix.
Session apps are temporary apps, primarily used by background system processes rather than front-end user consumption, so including them usually adds noise and low-value alerts.
Only include session app events if you intentionally create session apps through Qlik Cloud APIs. In that case, you should filter on the actor so that only your own generated events are processed.
Yes branch:
If the app is a session app, the automation stops early. The run title is updated to Analysis skipped (SessionApp) so the automation history clearly shows why no alert was sent.
No branch:
If the app is not a session app, the automation continues to the next blocks, where it gathers tenant, space, and user details before sending the failure analysis to OpenAI and posting the result to Slack.
What you need to configure:
This block retrieves the hostname and other details about your Qlik Cloud tenant.
How it works:
The tenant hostname is later used to build a direct link to the failed app in the Slack message. Without this step, the link would be incomplete.
This block checks whether the failed analytics app reload came from an app that belongs to a space.
How it works:
It checks whether the space ID in the event payload is empty.
Yes branch:
If a space exists, the automation continues to the Get Space block. This block retrieves the name and type of the space where the analytics app lives. It uses the space ID from the App Reload Finished webhook event to look up the full space details, and it's stored in an object variable. The space name and type are included in the Slack message so your team immediately knows where the failed app is located.
No branch:
If no space exists, which means the app resides in the user's personal space, the automation creates a default object with the name Personal and type personal. This ensures the Slack message still has a space value to display, even when the app is in the user’s personal space.
What you need to configure:
Nothing. This condition is pre-configured and requires no changes.
This block retrieves details about the user whose app reload failed.
How it works:
It uses the user ID from the App Reload Finished webhook event to look up user details. This information can be referenced in the Slack message and is useful if you want to escalate directly to the app owner or expand the notification with owner's contact information later.
This block constructs the prompt that is sent to OpenAI.
How it works:
It formats the app reload error details from the App Reload Finished webhook event payload into a structured message and passes it to the OpenAI Chat Completion block.
The pre-written prompt instructs OpenAI to act as a senior Qlik Cloud Analytics engineer, identify the root cause of the app load script error, explain why it happened, and suggest the exact changes needed to fix it. Responses are capped at 800 characters and formatted as plain numbered paragraphs so they fit cleanly into a Slack message.
What you need to configure:
The role field is empty by default. The automation will fail at this step if you do not provide a role before running.
This block bridges the prompt builder and the OpenAI Chat Completion block.
How it works:
The OpenAI Chat Completion block expects messages to be passed as a list, not a single object. This block first empties the chatList variable to make sure there is no leftover data from a previous run, then adds the response from the Chat Completion Message block as a new item in the list. The result is a properly formatted list that can be sent directly to the Chat Completion block.
What you need to configure:
Nothing. This block is pre-configured and works automatically based on the output of the previous step.
This block sends the prompt to OpenAI and receives the analysis response.
How it works:
It calls the OpenAI Chat Completion API using the message built in the previous step.
The token limit is pre-set to 300 to keep responses concise. It prevents the model from rambling, helps cap output length to reduce cost, and remains bounded by the selected model's own architectural limits. The model field is intentionally left blank so you can choose the model that suits your subscription.
We tested this template with the gpt-5.4-mini model, and it performed very well for reload-failure diagnosis. In most cases, lower-cost models are generally very effective at diagnosing.
What you need to configure:
The model field is empty by default. The automation will fail at this step if you do not provide a model name before running.
This block checks whether the AI response fits within the Slack message size limit before sending.
How it works:
It measures the character length of the OpenAI response. If the response is 2800 characters or more, the message is too long to be posted cleanly in Slack, so the automation takes a fallback path.
Yes branch, response is too long (≥ 2800 characters):
The output variable is set to a fallback message: "Generated message was too long. Refer to [link] for full response."
The link points directly to this automation run in the history page so the team can still access the full AI diagnosis.
No branch, response fits (< 2800 characters):
The output variable is set to the full AI response from OpenAI. This value is then used in the Slack message in the next step.
What you need to configure:
Nothing. This condition is pre-configured. You can adjust the 2800-character threshold if needed.
This block posts the App Reload failure notification along with AI diagnosis to your Slack channel.
How it works:
It formats all collected details into a single Slack message. The message contains:
What you need to configure:
The channel field is empty by default. The automation will fail at this step if you do not provide a channel before running.
This block writes the full Slack message content to the automation run output so it is visible directly in the Output section of the automation run history.
How it works:
It captures and displays the exact same formatted message that was sent to Slack — including the app link, reload ID, space details, error code, and AI diagnosis. This means you can review what was sent without opening Slack, which is useful when debugging or auditing past runs.
These two blocks make automation run history easy to scan without opening every run.
How it works:
Why this matters:
What you need to configure:
You can modify this automation to match your specific requirement:
The automation does not send a Slack message:
The AI response is too long:
A reload you expected to see was not processed:
This template gives you a focused, low-noise starting point for AI-assisted analytics app reload failure handling in Qlik Cloud. By filtering to analytics app errors only and excluding both session apps and data preparation reloads, it keeps alerts relevant and actionable. Teams can respond faster to app load script issues by receiving a clear Slack notification with context and an AI diagnosis the moment something goes wrong. You can modify the automation by adjusting the AI prompt, changing the destination channel, or adding escalation steps such as email or Microsoft Teams alerts.