Skip to main content
In this guide, you’ll build a complete workflow that:
  1. Reads data from a Google Sheet
  2. Analyzes the data with AI
  3. Generates a summary report

Prerequisites

Make sure you’ve completed the Quickstart and have your API key configured.

Step 1: Create the Workflow

Start by creating a new Python file:
sales_report.py

Step 2: Add the Data Source Node

Use a ToolNode to read data from Google Sheets:
The {{input.sheet_id}} syntax is a template variable. It will be replaced with actual values when you run the workflow.

Step 3: Add the Analysis Node

Use an LLMNode to analyze the data:

Step 4: Add the Summary Node

Add another LLM node to create an executive summary:

Step 5: Complete Workflow Code

Here’s the complete workflow:
sales_report.py

Step 6: Run Your Workflow

Execute the workflow:
Expected output:

Understanding the Workflow

Workflow Diagram

How Nodes Connect

  1. read_sales runs first (no dependencies)
  2. analyze_data waits for read_sales to complete
  3. executive_summary waits for analyze_data to complete

Template Variables

  • {{input.sheet_id}} - Replaced with input data at runtime
  • {{read_sales}} - Replaced with the output of the read_sales node
  • {{analyze_data}} - Replaced with the output of the analyze_data node

Adding Conditional Logic

Want to send an alert only if sales drop? Add a conditional node:

Exporting to YAML

You can also define workflows in YAML:
This creates:
sales_report.yaml

Next Steps

Node Types Deep Dive

Learn about all available node types

Tool Integrations

Connect to 100+ tools and services

Conditional Logic

Build dynamic workflows with branching

Memory & State

Persist data across workflow runs
Great job! You’ve built a real workflow with multiple nodes, dependencies, and AI analysis.