AI block
Ask a model for a one-sentence summary and use it in a later block. Time: 15 minutes. Needs: a saved OpenAI-compatible model connection (here Summary model).
How it works
systemandpromptare templates. Values you insert are sent to the model, and secrets are masked in the run record.- The block always publishes
text(the reply) andmodel. - If you declare another property, such as
summary, Termorq asks the model to end its reply with one JSON object and reads that final line. If the reply doesn’t end with that object, the block fails. - A new AI block starts with a prompt that already includes earlier properties, and a default
summaryoutput.
Test it in isolation
Select the block and choose Open AI editor. Type JSON or plain text in Step input and choose Execute step:
| Step input | Available in the prompt as |
|---|---|
{"trigger":{"text":"Hello"}} | {{ trigger.text }} |
{"name":"Ada"} | {{ inputs.name }} |
Hello (plain text) | {{ trigger.text }} and {{ inputs.text }} |
The editor shows the response, errors, published output, and any skills used. Isolated tests don’t start triggers or create a Runs entry. input_sample is saved with the workflow, but a full run never uses it.
Model output is data, not a decision. Validate it in Code or a Decision before you act on it, for example by checking summary isn’t empty and is under 200 characters.
The AI editor shows a reply ending in a line like {"summary":"The deploy completed in four minutes with two warnings."}, and Output lists summary. The exact wording varies from run to run.
Change the block to classify the message as info, warning, or error, publishing severity constrained by enum.