Rewst's AI PSA Analyzer Crate
What does Rewst's AI PSA Analyzer Crate do?
This Crate uses Rewst’s internal AI or your integrated Anthropic or OpenAI provider to analyze ticket data and recommend the most effective automations for your customers' needs. The workflow pulls filtered ticket data from a specific number of days. Using AI to evaluate that data, it identifies the most relevant existing Rewst Crates and recommends custom automations if needed. Runtime may vary depending on the PSA platform and ticket volume.
Workflow breakdown
The workflow begins at the START task, which uses the noop action to evaluate the incoming input and route execution down one of three paths based on the first matching condition.
If the request method is GET, the START task transitions directly to the END task labeled "Webhook," which serves the previously generated HTML report without re-running the analysis.
If an AI provider and a valid days offset greater than zero are provided, the START task transitions along the "Form" path to the list_crates task, publishing a calculated date_n_days_ago value and setting the retry_limit to zero.
If neither of the above conditions is met, the START task follows the "Failed" fallback transition to the failure_capture task, logging an error that incorrect input data was supplied.
The list_crates task uses the Generic GraphQL Request action to query the Rewst marketplace API for all available crates, retrieving their names, unpacking counts, and IDs.
On success, the list_crates task publishes a sorted list of Rewst crates and a comma-separated string of crate names, then transitions to the list_tickets task.
If the list_crates task fails, it transitions to the failure_capture task with an error log entry.
The list_tickets task calls the [REWST - TASK] Get Ticket Data With Filters sub-workflow action to retrieve up to 2000 ticket titles from the organization's PSA, filtered by the calculated date, ticket types, and ticket queues.
If the AI provider is set to "rewst" and tickets were returned, the list_tickets task transitions along the "Rewst AI Provider" path to the rewst_ai_response task, publishing sanitized ticket data, the total ticket count, and an automation log entry.
If tickets were returned and the AI provider is not "rewst," the list_tickets task transitions along the "Client AI Provider" path to the get_ai_response task, publishing the sanitized tickets, total count, a rendered prompt template, and an automation log entry.
If the list_tickets task succeeds but returns no tickets, it follows the "Failed" fallback transition to the failure_capture task with a log message indicating it failed to get ticket data.
If the list_tickets task itself fails, it transitions to the failure_capture task with a structured automation log entry.
The rewst_ai_response task uses the HTTP Request action to POST the ticket data and Rewst crate names to a Rewst-hosted AI endpoint, including the organization ID, organization name, and workflow name as headers, with a 300-second timeout.
If the rewst_ai_response task returns a valid output that does not contain "incorrect data," it transitions along the "Successful" path to the update_html_template task, publishing enriched crate suggestions that flag each suggestion as a Rewst Crate or Custom Crate, include marketplace links where applicable, and sort by ticket volume and Rewst-created status, along with a full HTML report template.
If the rewst_ai_response task times out, it transitions to the failure_capture task with a log entry noting the timeout.
If the rewst_ai_response task returns a "Maximum request body size exceeded" error, it transitions to the failure_capture task with a corresponding log entry.
If the rewst_ai_response task succeeds but does not match the specific success condition, it follows a general success fallback transition to the update_html_template task, publishing the raw output or a default failure message as the HTML template.
If the rewst_ai_response task fails outright, it transitions to the failure_capture task.
The get_ai_response task calls the [REWST - TASK] Select AI Prompt Provider sub-workflow action, passing the model, rendered prompt template, AI service, max tokens, AI provider, and a flag to expect JSON output.
On success, the get_ai_response task transitions to the update_html_template task, publishing enriched crate suggestions, backup crate suggestions, a full dark-themed HTML report template, and a structured automation log entry.
If the get_ai_response task fails, it transitions to the failure_capture task with an automation log entry.
The update_html_template task uses the [Crate - Dev] Rewst: Upsert Template action to save or replace the HTML report body into a template named "[REWST - TEMPLATE] Internal Ticket Analysis HTML."
On success, the update_html_template task transitions to the list_triggers task, publishing an automation log entry for the AI response step.
If the update_html_template task fails, it transitions to the failure_capture task with an automation log entry.
The list_triggers task uses the List Triggers action to retrieve all triggers associated with the current workflow so it can construct the webhook URL for the HTML report.
If an email address is present in the context, the list_triggers task transitions along the "Email" path to the core_sendmail task, publishing a dynamically constructed webhook URL that points to the correct Rewst engine region based on the app URL.
If no email address is present, the list_triggers task transitions along the "No Email" path directly to the END task.
If the list_triggers task fails, it transitions to the failure_capture task with an error log entry.
The core_sendmail task uses the sendmail action to send an email to the address in the context with the subject "Rewst Internal Ticket Analysis" and a custom HTML body containing a "View Analysis" button linking to the webhook URL.
On success, the core_sendmail task transitions to the END task.
If the core_sendmail task fails, it transitions to the failure_capture task with an automation log entry.
The failure_capture task is a noop action configured with a join of 1, meaning it waits for any single inbound transition before proceeding, and it always transitions to the END task.
The END task is a noop action configured with a join of 1 that serves as the single convergence point for all paths, where it compiles a final automation_log by iterating over all context variables prefixed with "log_," aggregating their status codes, errors, and warnings into a structured summary that is published as the workflow output.
Crate prerequisites
Before unpacking the Crate, you'll need to have the integration for one of the following PSAs set up:
You can also use an Azure instance of OpenAI with this Crate. To do that, complete the Azure OpenAI Integration Setup before unpacking.
Example ticket analysis report

Unpack Rewst's AI PSA Analyzer Crate
Navigate to Marketplace → Crates in the left side menu of the Rewst platform.
Search for
Rewst's AI PSA Analyzer.
Click on the Crate tile to begin unpacking.
Click Continue.
Set all triggers in the Crate to Enabled. If you skip this step, you won't be able to access the form unpacked with this Crate.
Click Unpack.
Use Rewst's AI PSA Analyzer Crate
The Crate runs from a form submission.
Navigate to Automations > Assets > Forms in the left side menu of your Rewst platform.
Search for
[REWST]: Rewst's AI PSA Analyzer.Click ⋮ > Usages > View Direct URLs.
Click the link for the organization you want the form to run on. This launches the form in a new tab.
Use the drop-down selector to select the AI provider. If you want to use your OpenAI or Anthropic providers, install those integrations before using the form.
Select the ticket queues or boards to filter by.
Select the ticket types, issue types, or categories to filter by in the selector that appears.
Enter the Maximum age in days for selecting tickets. This is limited to a maximum of 2000 sampled tickets.
Enter the recipient email address where you want the link to the report sent.
Click Submit.

Got an idea for a new Crate? Rewst is constantly adding new Crates to our Crate Marketplace. Submit your idea or upvote existing ideas here in our Canny feedback collector.
Last updated
Was this helpful?
