# Using Data Across Steps

Getting data from one step to another is essential for building workflows. In fact, most workflow logic involves passing data between steps. Whether you're passing an email address from a form to a new email, using AI output to update a spreadsheet, or accessing nested CRM data, understanding Step Outputs is key to building effective automations.

## What Are Step Outputs?

**Step Outputs** are the reusable data created by triggers and steps in your workflow. They appear as "pills" like <img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-48ab79a540911d01edfaf312f9ac5537467c89c5%2FCleanShot%202024-11-19%20at%2010.34.43.png?alt=media" alt="Step output pill showing step number 1, Gmail logo, and Contact type" data-size="line"> that you can reference in later steps.

Each pill shows:

* The **step number** that created it (step #1 is always the Trigger)
* The **app logo** where the data comes from (e.g., Gmail, HubSpot)
* The **data type** (e.g., Email, Row, Contact)

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-0b662033041edb7dc2323ac3b718892cc3b64a41%2FCleanShot%202024-11-19%20at%2011.01.19.png?alt=media" alt="Relay.app workflow editor showing step output pills connected to their originating steps with visual lines"><figcaption><p>Step Output pills help you understand where data came from</p></figcaption></figure>

***

## The Basics

### How Data Enters Your Workflow

Step Outputs are created in four main ways:

1. **From** [**Triggers**](https://docs.relay.app/triggers/triggers-101) - e.g., email addresses, subjects, attachments from an "email received" trigger
2. **From** [**Find Steps**](https://docs.relay.app/data/find-steps) - e.g., CRM contacts matching a company name
3. **From** [**Actions**](https://docs.relay.app/actions-in-apps/actions-101) - e.g., a newly created Google Sheets row
4. **From** [**AI Steps**](https://docs.relay.app/ai/ai-steps) - e.g., extracted invoice amounts, dates, and vendor names

### Understanding Data Types

Every field in a Step Output has a specific **type** (Text, Date, Number, URL, Email, File, or app-specific types like Contact or Subscription).

**Why types matter:** Relay.app uses types to ensure data flows correctly between steps. For example, a Gmail attachment field only accepts File types, and a "Scrape text from website" step expects a URL type.

<div align="left"><figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-206c94b711dd17730f1c7a8f7760ad44dc5b91ce%2FCleanShot%202024-08-16%20at%2018.20.12.png?alt=media" alt="Gmail send email step showing attachment field that only accepts File type data from compatible step outputs" width="375"><figcaption><p>Type-safe inputs help prevent configuration errors</p></figcaption></figure></div>

### Always Up-to-Date Data

{% hint style="success" %}
**A powerful feature:** Step Outputs automatically fetch current data from the source app every time they're used—even if the underlying data changed after the trigger fired.

**Example:** If a calendar event's start time changes during a workflow with a "wait 5 days" step, referencing that start time later will show the updated value.

**Benefits:**

* No need to re-fetch data with Find steps
* Works seamlessly with [Wait steps](https://docs.relay.app/flow-control/wait-steps)
* Always reflects the current state of your data
  {% endhint %}

***

## Using Step Outputs in Your Workflow

### Three Ways to Insert Data

You can reference Step Outputs in subsequent steps using any of these methods:

1. **Text inputs - \[+] button**: Best for exploring available data and browsing all options
2. **Text inputs - @ shortcut**: Fastest method when you know what you're looking for
3. **Typed inputs**: Use the type-specific picker (e.g., date picker, contact picker) for automatic type safety

<div align="left"><figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-b6146a9cd8ec053637e6de5bc132a1bc8d7945ff%2FCleanShot%202024-08-16%20at%2018.36.01.png?alt=media" alt="Text input field with data picker menu opened showing available step outputs and data fields to insert"><figcaption><p>Inserting data via the [+] menu</p></figcaption></figure> <figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-df449e8b284d4387df481228c0ff460982870907%2FCleanShot%202024-08-16%20at%2018.39.49.png?alt=media" alt="Text input field showing @ symbol autocomplete menu with step output suggestions for quick data insertion"><figcaption><p>Quick insert using '@' keyboard shortcut</p></figcaption></figure> <figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-53e7359672f9ebb7a596d8da131638de7dfd8589%2FCleanShot%202024-08-16%20at%2018.40.48.png?alt=media" alt="Date picker interface showing available date-type step outputs for selection in a typed input field"><figcaption><p>Type-specific picker for dates</p></figcaption></figure></div>

### Accessing Specific Fields

When you need a specific field from a Step Output, it appears in the pill: <img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-c87b5a7292c8c1fe92ad82192e329b0f91937c65%2FCleanShot%202024-11-19%20at%2010.34.02.png?alt=media" alt="Step output pill showing Gmail Contact with First name field specified" data-size="line">

### Working with Nested Data

Step Outputs provide instant access to linked data at any depth—no extra lookup steps needed.

Nested levels are shown with a `>` symbol, like this: <img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-903484c5d2f05c80c2570388715f9665d55b410e%2FCleanShot%202024-11-19%20at%2010.40.39.png?alt=media" alt="Step output pill showing Paddle Subscription > Customer > Email address with nested hierarchy" data-size="line">

**Real-world example:** In a sales workflow triggered by a new deal in HubSpot, you can directly access:

* **Deal > Associated Contact > Email address** - to send a personalized email
* **Deal > Associated Company > Industry** - to route to the right team
* **Deal > Owner > Name** - to notify the account manager

All without adding separate "Find Contact," "Find Company," or "Find User" steps.

<div align="left"><figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-6e4fb07fd88d8eb51a5fb23f2da0e4bcce588ce8%2FCleanShot%202024-08-16%20at%2018.09.03.png?alt=media" alt="Data picker showing hierarchical access to nested objects with Contact > Company > Deal structure demonstrating linked data access" width="563"><figcaption><p>Navigate infinite levels of linked data effortlessly</p></figcaption></figure></div>

***

## Troubleshooting

### Common Issue: Can't Find the Data I Need

**Problem:** You want to use data from a previous step, but it doesn't appear in the picker.

**Example:** You have a Slack message containing a URL, and you want to scrape it. But when you try to select the URL in the "Scrape text from website" step, nothing appears.

**Why this happens:** Relay.app enforces type matching for safety. The Slack message body is Text type, but the scraping step expects a URL type.

**Solution:** Use an AI step or data transformation to extract the URL from the text first. Once you have a proper URL type, it will appear in the picker.

### Inspecting Available Data

To see all fields available in a Step Output:

1. Open the step configuration dialog that created the output
2. Look at the **Output** section at the bottom
3. Click the Step Output pill to explore its structure

<div align="left"><figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-7c4d6fc42ac48a070d6face53640b64be3e8e6a3%2FCleanShot%202024-11-19%20at%2011.49.16.gif?alt=media" alt="Animated demonstration of clicking on a step output pill in the step configuration dialog to view available data fields and structure" width="563"><figcaption><p>Inspect Step Output structure by clicking its pill</p></figcaption></figure></div>

## Next Steps

**Ready to build more complex workflows?**

* [**Find Steps**](https://docs.relay.app/data/find-steps) - Search for specific data in your connected apps
* [**Lists and Arrays**](https://docs.relay.app/data/lists-arrays) - Handle multiple items at once with loops and filters
* [**Transform Data**](https://docs.relay.app/built-in-actions/transform-data) - Convert between data formats and manipulate values
* [**Inspecting Run Data**](https://docs.relay.app/data/inspecting-run-data) - Debug workflows by examining actual data from runs
