Group

Group hooks allow you to execute a sequence of steps, optionally in a loop. This is particularly useful for running multiple operations together, iterating over datasets, or creating reusable step templates.

Configuration

- type: group
  steps:                # Required: Array of steps to execute
    - type: log
      message: "Step 1"
    - type: http
      url: "https://api.example.com"
  loop: [1, 2, 3]      # Optional: Array or jmespath expression for iteration
  env:                 # Optional: Environment variables for all steps
    ENV_VAR1: "value1"
    ENV_VAR2: "value2"
  on_failure: abort    # Optional: abort/warn/quiet/skip
  id: my_id           # Optional. Will be generated. Use `log` hook with {runtime_state} to view state.

Properties

Property
Required
Description

steps

Yes

Array of step configurations to execute

loop

No

Array or jmespath expression defining iteration values

env

No

Map of environment variables available to all steps

on_failure

No

What to do if any step fails (abort/warn/quiet/skip)

Output

When the group hook executes successfully, it returns the following output that can be accessed in subsequent hooks:

You can access these values in subsequent hooks using the following syntax (jmespath):

  • {state.hook_id.status} - Status of the hook execution

  • {state.hook_id.loop_values} - Values used in loop (if provided)

Within loop iterations, steps can access:

  • {loop.index} - Current iteration index (0-based)

  • {loop.value} - Current value from the loop array/expression

Examples

Basic Step Group

Execute multiple steps in sequence:

Loop Over Array

Iterate over a fixed array of values:

Loop Over Previous Hook Results

Use results from a previous hook as loop input:

Conditional Step Execution in Loop

Execute steps conditionally within a loop:

Environment Variables in Group

Share environment variables across steps:

Nested Groups

Create hierarchical step organization:

Last updated

Was this helpful?