Loopfour
Blocks

Blocks

The building components of your billing automation workflows

Blocks are the building components you connect together to create workflows. Each block handles a specific task -- from calling the Stripe API to running AI-powered data extraction or branching logic based on invoice amounts.

Loopfour Studio organizes its built-in blocks into the categories below.

Block Categories

Triggers

Triggers define when a workflow executes. Every workflow needs at least one trigger.

  • Webhook Triggers -- Receive events from external systems (Stripe, HubSpot, per-tenant custom endpoints). Declared on the workflow's trigger configuration rather than dragged from the palette
  • Schedule Trigger -- Run on a cron schedule (daily, weekly, custom)
  • Slack Trigger -- React to Slack messages, slash commands, and interactive components

Integrations

Integration blocks connect to external services. Each requires an OAuth or API key connection.

Payments:

  • Stripe -- Invoices, payments, subscriptions, customers

CRM:

  • Salesforce -- Records, queries, platform events
  • HubSpot -- Contacts, deals, companies, tickets
  • Attio -- Records, lists, notes

Accounting:

  • QuickBooks -- Invoices, payments, journal entries
  • NetSuite -- Records, transactions, saved searches
  • Xero -- Invoices, contacts, bank transactions
  • Sage Intacct -- GL, accounts payable, accounts receivable
  • Rillet -- Revenue recognition, deferred revenue

Communication:

  • Slack -- Send messages, post to channels, event triggers
  • Email -- Send email through Gmail, Outlook, or Resend

Documents:

Spreadsheets:

  • Google Sheets -- Read, write, append, and manage spreadsheet data

AI

  • Agent -- Connect to Claude Opus 5 or GPT-5.6 Sol for text processing, data extraction, classification, and tool use

Control Flow

Control flow blocks manage execution paths within your workflow.

  • Condition -- Branch based on boolean expressions (e.g., amount > 1000)
  • Loop -- Iterate over collections (e.g., process each line item)
  • Parallel -- Execute multiple paths concurrently

Actions

  • Stagehand -- Browser automation: navigate portals, download reports, fill forms using AI-driven browser control

Data

  • Transform -- Map and reshape data between systems
  • Code -- Run custom JavaScript in a sandboxed environment
  • Data Table -- Read and write rows in user-managed data tables
  • PDF -- Read text, extract selected pages, or inspect PDF documents

Utility

  • Wait -- Pause execution for a specified duration
  • Approval -- Human-in-the-loop: pause for manual approval before continuing
  • Sub-workflow -- Call another workflow as a step

How Blocks Work

Each block has three components:

  1. Inputs -- Data coming from upstream blocks or the trigger payload
  2. Configuration -- Settings that control behavior (API action, conditions, prompts)
  3. Outputs -- Data produced for downstream blocks to consume

Blocks are connected by edges that define data flow. The execution engine builds a directed acyclic graph (DAG) from your connections and runs blocks in dependency order -- independent blocks execute concurrently automatically.

Common Patterns

Sequential Processing

Chain blocks where each processes the output of the previous one:

Webhook Trigger -> Transform (map payload) -> Stripe (create invoice) -> Slack (notify)

Conditional Branching

Use Condition blocks to route based on data:

Webhook -> Condition (amount > 1000?)
              -> Yes: Approval -> Stripe (create invoice)
              -> No: Stripe (create invoice)

Parallel Execution

Run independent tasks concurrently:

Stripe (payment received) -> Parallel
                                -> QuickBooks (record payment)
                                -> Slack (notify finance)
                                -> Gmail (send receipt)

Loop Processing

Iterate over collections:

Salesforce (get line items) -> Loop (for each item)
                                 -> Stripe (create invoice line)

Block Configuration

All blocks share common configuration options:

OptionDescription
NameHuman-readable label displayed on the canvas
Error HandlingStrategy: fail, continue, or retry with backoff
TimeoutMaximum execution time before the step is killed
Retry ConfigMax attempts, initial delay, backoff multiplier

Additionally, each block type has specific configuration. See individual block documentation for details.

Frequently Asked Questions

Loopfour Studio includes triggers, integrations, AI agents, control-flow blocks, browser automation, data tools such as PDF and Data Table, and utility blocks. The lists above link to the available block documentation.

Yes. A single block output can connect to multiple downstream blocks. When the source block completes, all connected downstream blocks that have their dependencies satisfied will execute. This is how you create fan-out patterns like notifying multiple channels after an invoice is created.

When a block fails, the behavior depends on its error handling configuration. With the fail strategy (default), the workflow stops. With continue, the error is logged and downstream blocks receive a null output. With retry, the block is automatically retried with exponential backoff up to the configured maximum attempts.

The execution engine analyzes dependencies and runs blocks in the most efficient order. Blocks that depend on each other run sequentially. Independent blocks (no shared dependencies) run concurrently by default. You can also explicitly use the Parallel block to fan out to multiple paths.

The Code block lets you run arbitrary JavaScript for custom logic. For services without a built-in integration, you can use the Code block to make HTTP requests, or use the Stagehand block for browser-based automation of web portals.

Use template variable syntax to access data from other blocks. The exact syntax depends on the execution context, but generally you reference step outputs using dot notation like steps.stepId.output.fieldName. The visual editor provides autocomplete for available references.

On this page