See llms.txt for all machine-readable content.

Back to Templates

Validate AI agent JSON responses with Flowhush and OpenAI GPT-4.1

Quick Overview

This workflow runs on a schedule, prompts an OpenAI-powered AI Agent to return JSON, and sends the result to Flowhush for output validation so you can branch your automation based on whether the response is recorded as a failure.

How it works

  1. Runs at the configured time using a schedule trigger.
  2. Sets the Flowhush ping URL and the task prompt used to generate the agent response.
  3. Sends a /start ping to Flowhush to record the beginning of the run.
  4. Uses an OpenAI chat model through an AI Agent to generate a JSON-only response for the заданный task.
  5. Posts the agent’s JSON output to the Flowhush ping URL for validation and monitoring.
  6. If Flowhush records the run as a failure, routes to a “rejected” path; otherwise, routes to a “use output” path for downstream actions.

Setup

  1. Create a Flowhush monitor, copy its ping URL, and set the output validation rules you want Flowhush to enforce.
  2. Update the Flowhush ping URL and the task text in the workflow’s settings step.
  3. Add an OpenAI credential and confirm the selected model in the OpenAI chat model configuration.
  4. Replace the placeholder end steps with your own actions for handling rejected outputs and using valid outputs.