Generate and route verified query records from generated queries

Recipe ToolsWorkatoArtificial Intelligence

What it does

When a scheduled time arrives, this automation retrieves generated queries from a data table and creates verified query records for each unique query. Someone assigned as SQL Generation Assistant processes the records autonomously, and new ones are published to a topic for approval.

Who it's for

Data and analytics teams who need to build verified query records from generated output without manual query entry.

How teams use this

Build verified query records from daily generated output

Run the automation each day to convert generated queries into verified query records, check for duplicates, and route them for approval. The team gets a consistent daily flow of new records.

Prevent duplicate verified query records

Before creating a new verified query record, search the table to confirm that query does not already exist. Only unique queries become new records in the system.

Route records to a different approver

Change the SQL Generation Assistant assignment to route verified query records to a different team member or role. The rest of the flow stays the same.

Add a query quality filter before creation

Include a condition to check query length, complexity score, or other quality metrics before a verified query record is created. Only queries that meet the threshold move forward.

How it works

  1. Run daily at midnight. This automation starts every day at 12:00 AM to check for new generated queries that need verified query records.
  2. Retrieve generated queries in batch. Search the Workato Db Table for all generated queries where the verified query enabled flag is true, then create a variable to track unique queries.
  3. Build verified query records for each query. For each unique query, search the Workato Db Table to check if a verified query record already exists. If none is found, create a new record in the table.
  4. Publish records for approval. Send each new verified query record to the Approval Event topic in Workato Pub Sub so someone can review and approve it before use.
  5. Assign processing task. Route the batch of verified query records to the SQL Generation Assistant in Workato Genie so they are processed autonomously without further manual steps.