All Collections
Referencing variables
Referencing variables

Use variables to pass data between actions and prompts

Jake Rosenthal avatar
Written by Jake Rosenthal
Updated over a week ago

How to reference variables in workflows

Referencing variables in workflows allows you to pass data between the trigger and between actions and prompts.

This article will explain how to reference variables using a specific example: the LinkedIn-Enhanced Cold Sales Email Generator workflow.

  1. Identify the trigger inputs: In this example, the trigger has two inputs: Email address and Name. These inputs become variables that you can reference in subsequent actions and prompts.

  2. Reference variables in actions: Map action block input fields to previous outputs and trigger inputs (which are variables)

    • The next action in the workflow is "Summarize Linkedin Profile from Name and Email." It requires a Name and Email address. You can reference the variables from our trigger in order to fill in these inputs.

    • Similarly, in the "Write Company Description from Email Address" action, you'll reference the Email Address variable from the trigger to provide the necessary input.

  3. Combine variables in prompts: In the final step of the workflow, you can take the outputs from the previous two actions (profile summary and company description) and reference those variables in the "Write Email" prompt. This allows the prompt to use the generated content from earlier steps as inputs/context for creating the final email.

It's important to note that, by default, actions do not have access to the outputs of previous actions without directly referencing them as variables. By explicitly referencing variables, you ensure that the necessary data is passed between steps in your workflow.

By understanding how to reference variables in workflows, you can create powerful automations that seamlessly pass data between actions and prompts, enabling you to build sophisticated workflows tailored to your specific needs.

Did this answer your question?