N
nostackai Docs
Docs/Logic blocks
Logic blocks

Logic blocks

Multi-step custom APIs — conditions, loops, webhooks, AI.

Logic blocks (custom APIs)

When entity CRUD isn't enough, a logic block is a multi-step pipeline you compose from steps — conditions, loops, webhooks, AI — exposed as one endpoint.

logic-blockscustom-api
5 min Read

Step types

The building blocks of a logic block — entity operations, control flow, external calls, and AI steps.

logic-blockssteps
6 min Read

Variables & templating

Steps pass data through a scoped variable namespace referenced with {{...}} — request input, prior step outputs, and request context.

logic-blocksvariables
4 min Read

Formulas

The formula step computes derived values with a small built-in function library — every function it supports, with real syntax.

logic-blocksformulas
6 min Read

Variable types

create_variable and set_variable work with four types — string/number/boolean, entity, and collection — each with its own shape and shorthand accessors.

logic-blocksvariables
5 min Read

The connector step

How connector steps inside a logic block map fields into a pre-defined request, where auth comes from, and how to read a failure.

logic-blocksconnectors
6 min Read

AI Call

ai_call is the one AI step you need — classification, extraction, summarization, generation, comparison — plus how to ground it in entity data for RAG.

aiai_callrag
7 min Read

AI Call — Intent

What each of the 9 intents actually changes, stated honestly — it's the system-prompt persona, not different execution logic.

aiai_callintent
3 min Read

AI Call — Context

The 5 context field types and exactly what happens to each at execution time — fetch, transcribe, or pass through.

aiai_callcontext
4 min Read

AI Call — Output

The exact output data shape per format — the field names downstream steps actually see, stated precisely, plus how to use a list output as a Loop source.

aiai_calloutput
5 min Read

AI Call — Model & config

Provider, model, max output tokens, and temperature — including the automatic reasoning-model default that picks the right temperature for you.

aiai_callconfig
3 min Read