Automations Framework
  • Get Started
    • Introducing Ensemble
    • Working with Workflows
    • Quickstart
    • Important Links
    • Client Integration
  • Deep Dive
    • workflow.yaml Structure
    • Under the Hood
    • Ensemble Protocol
  • Products
    • Ensemble CLI
    • Ensemble API
  • Use Cases
    • Intro
    • DeFi and Trading
    • On-Chain Games
    • Infrastructure
Powered by GitBook
On this page
  • Overview
  • Workflow.yaml structure
  • Steps
  • Triggers
  1. Deep Dive

workflow.yaml Structure

Technical specification of workflow.yaml , the workflow definition file

PreviousClient IntegrationNextUnder the Hood

Last updated 8 months ago

Overview

Ensemble workflows serve as a primitive element for automating on-chain processes across diverse blockchain networks. These workflows are composed of a series of sequential steps and triggers, enabling developers to create powerful automation solutions that can be customized by users to suit specific use cases. By facilitating the automation of decentralized operations, from DeFi transactions to automated trading strategies, Ensemble workflows offer the flexibility and scalability needed for various blockchain applications.

This page focuses on the technical specifications of the workflow.yaml file, which defines the workflow process. For a general overview, please visit the page.

Workflow.yaml structure

Workflows in Ensemble represent a collection of tasks that are logically grouped and executed in a defined sequence. Each workflow can interact with multiple smart contracts and blockchain networks, making them highly versatile tools for on-chain automation. The modular design of Ensemble workflows allows each step to be executed based on specific conditions or triggers, enabling efficient and dynamic automation.

The workflow.yaml file defines workflows in a structured format, allowing for easy management of complex automated tasks. Below is a breakdown of the key fields in the file:

Attribute
Description

name

A unique identifier for the workflow.

version

Specifies the version of the workflow.

wallet

Defines wallet-related information, such as wallet type (EOA or smart wallet) and address. The workflow interacts with this wallet.

Steps

Each workflow consists of a series of steps, which are discrete operations executed either sequentially or conditionally based on triggers. The fields for defining a step are:

Attribute
Description

name

A human-readable name for the step.

module

The module to be used (optional), allowing for extended functionality.

method

The method to be called within the module, representing the action to be performed.

arguments

Specific arguments required for the method execution, such as contract addresses or parameters for blockchain interaction.

Triggers

Triggers determine when a step is executed, adding flexibility by allowing the workflow to react to various conditions. The fields for defining a trigger are:

Attribute
Description

name

A unique name for the trigger.

type

Defines the type of trigger (e.g., periodic, event-based).

interval

Specifies how often the trigger should activate (used for periodic triggers).

value

Additional values or data points related to the trigger (e.g., block numbers or timestamps).

condition

Specifies the condition for trigger activation, including:

op

The operation to evaluate (e.g., lessThan, greaterThan).

value

The value used for comparison in the condition (e.g., a threshold for a price-based operation).

This structured approach allows for clear and manageable definitions of complex automated tasks.

Working with Workflows