How Blocks Work
Every block has three parts:- Inputs — values from the workflow’s trigger payload or a prior block’s output
- Config — the block’s settings, such as a prompt, a URL, a condition expression, or a transformation rule
- Output — a structured result the next block can reference by name
classify_ticket, the next block reads its result as {{ classify_ticket.output }}. You can also reference nested fields: {{ classify_ticket.output.urgency }}.
Here is a simple three-block chain to illustrate the pattern:
Name your blocks by what they do, not the tool they use.
fetch_customer is more readable than http_1 when you’re tracing a failure in the logs six months later.Block Types
Input and Output Blocks
Input
Defines the runtime payload fields that callers must provide when triggering the workflow. Every workflow starts with an Input block.
Text / JSON
Shapes or transforms data into a clean output format. Use this to restructure an API response or format a final return value.
HTTP
Calls any external REST API and returns the response body. Use this for any API that doesn’t have a dedicated integration block.
Save Document to Table
Persists workflow output to a Scout Database Table for later retrieval or search by agents and other workflows.
AI Processing Blocks
LLM / Reasoning
Generates text, answers questions, extracts structured data, or classifies inputs. Use this when the task requires language understanding.
Agent
Runs a fully configured Scout agent as a step inside your workflow. The agent uses its own tools, memory, and instructions to complete the task.
Web Search / Scrape
Pulls live context from the web. Use this to ground an LLM block in current information.
JavaScript
Runs custom logic when built-in block configuration isn’t sufficient. Use this for deterministic transformations that would be overcomplicated in a template.
Control Flow Blocks
Condition
Branches execution with if/else or switch logic based on any value in the workflow state.
Stop If
Ends the workflow immediately when a condition is true. Use this to short-circuit on invalid input or terminal errors.
Continue If
Proceeds only when a condition is met; otherwise skips the remaining blocks in that branch.
Delay
Adds a time-based pause between blocks. Useful for rate-limited APIs or workflows that need to wait for an external process.
Reduce
Iterates over a list and aggregates results. Use this to process arrays of items — records, tickets, leads — in a single workflow run.
Data and Integration Blocks
Query Database Table
Retrieves documents from a Scout Database — your internal knowledge base or stored workflow outputs.
Slack
Sends a message or creates a thread in any Slack channel or DM. Handles authentication and formatting for you.
Discord
Posts messages to Discord channels or direct messages without managing webhooks manually.
Twilio
Sends SMS messages or initiates calls via Twilio. Handles credentials and request signing automatically.
Choosing the Right Block
Use this reference table to select the right block for each step in your workflow.| Situation | Block to use |
|---|---|
| Accepting caller input | Input |
| Generating or analyzing text | LLM or Reasoning |
| Calling a REST API | HTTP |
| Branching on a value | Condition |
| Stopping on an invalid state | Stop If |
| Custom deterministic logic | JavaScript |
| Storing results for later retrieval | Save Document to Table |
| Sending a Slack message | Slack |
| Sending an SMS | Twilio |
| Iterating over a list | Reduce |
Agent Blocks: Embedding AI Judgment
An Agent Block lets you run a fully configured Scout agent as a single step in your workflow. This is the mechanism that allows you to combine the reliability of structured automation with the adaptability of AI. Use an Agent Block when:- A step requires reading and interpreting unstructured text
- The right action depends on nuance that a simple condition can’t express
- You want to reuse an existing agent’s capabilities inside a larger process
{ urgency: "high", queue: "engineering", draft_reply: "..." } — which downstream Condition and Action blocks can act on immediately.
Condition Blocks: Branching Logic
A Condition Block evaluates an expression and routes execution to one of two or more downstream branches. Use it to handle different cases — different customer tiers, different ticket types, different API response codes — without duplicating the rest of your workflow.Transform Blocks: Reshaping Data
Transform blocks (Text, JSON, and JavaScript blocks) restructure data between steps. Use them to:- Extract a specific field from a large API response
- Rename keys to match a downstream block’s expected schema
- Combine values from multiple prior blocks into a single object
- Format a date, truncate a string, or compute a derived value
{{ normalize_payload.output.ticket_id }}, {{ normalize_payload.output.subject }}, and so on.
Block Design Rules
Follow these rules to keep your workflows maintainable as they grow:- One responsibility per block. A block that fetches data should not also transform it. Split the jobs.
- Name blocks by what they do.
classify_urgencyandfetch_customerare far more useful thanllm_1andhttp_2when reading logs. - Guard expensive or irreversible actions. Place a Condition or Stop If block before any write operation, external API call with side effects, or message send.
- Keep transformation chains explicit. Avoid long implicit data reshaping inside a prompt. Use a Transform block first so the LLM receives clean, predictable input.
Next Steps
Creating Workflows
Apply the validate-fetch-decide-act-return pattern when assembling your blocks.
Running Workflows
Execute your workflow and inspect block-level output in the Console.
Logs
Trace block-by-block execution and debug failures in production.
Environments
Promote your workflow safely from development to production.