Skip to Content
πŸŽ‰ Scout Docs 2.0 is here!
WorkflowsBlocks

Blocks

Blocks are the units of execution in a workflow. Each block takes inputs, does one job, and produces output that downstream blocks can use. Chain them together and you get a workflow that’s easy to read, test and debug.

How a block works

Every block has three parts:

  • Inputs β€” values from the workflow payload or a prior block’s output
  • Config β€” the block’s settings (prompt, URL, condition, etc.)
  • Output β€” a structured result the next block can reference

You reference a prior block’s output using {{block_id.output}}. For example, if you have an LLM block with ID summarize, the next block can read its result as {{summarize.output}}.

A simple three-block chain looks like this:

  1. Input block β€” accepts {{inputs.user_query}} from the caller
  2. LLM block (summarize) β€” uses {{inputs.user_query}} in its prompt
  3. Text block β€” shapes the final response using {{summarize.output}}

See Logic and State for full details on how state moves between blocks.

Block categories

Input and output

  • Input β€” defines the runtime payload fields callers must provide
  • Text / JSON β€” shapes or transforms data into a clean output format
  • HTTP β€” calls external APIs and returns the response

AI processing

  • LLM / Reasoning β€” generates text, answers questions, extracts structure
  • Web Search / Scrape β€” pulls live context from the web
  • JavaScript β€” runs custom logic when built-in block config isn’t enough

If a decision needs to be made dynamically at runtime by an agent, use Agent Code Execution instead of a static block.

Control flow

  • Conditional / Continue If / Stop If β€” branch based on a value or condition
  • Delay β€” adds a time-based pause (useful for rate-limited APIs)
  • Reduce β€” iterates over a list and aggregates results

Data and integrations

  • Query Collection Table β€” retrieves documents from Scout’s internal knowledge base
  • Save Document to Table β€” persists workflow output for later retrieval
  • Slack / Discord / Twilio / CRM blocks β€” push actions into external tools

Choosing the right block

SituationBlock to use
Accepting caller inputInput
Generating or analyzing textLLM or Reasoning
Calling a REST APIHTTP
Branching on a valueConditional
Custom logic that config can’t expressJavaScript
Storing results for retrieval laterSave Document to Table
Sending a message to a userSlack, Discord or Twilio

A few common trade-offs:

  • LLM vs. JavaScript β€” Use JavaScript when the logic is deterministic and testable. Use LLM when the input is unstructured or requires judgment.
  • HTTP vs. integration blocks β€” Integration blocks (Slack, Twilio, etc.) handle auth and formatting for you. HTTP is for any other API.
  • Conditional vs. Stop If β€” Stop If ends the workflow immediately. Conditional routes to different branches and keeps going.

Block design rules

  • Keep each block focused on one responsibility
  • Name blocks by what they do, not the tool they use (e.g., fetch_customer not http_1)
  • Add guard conditions before expensive or irreversible actions
  • Avoid long implicit chains β€” keep transformations explicit so they’re easy to trace in the Console

Next steps

Last updated on