# Turn anything on the page into a variable.

> Do the task once while Stepwork records it. Then switch the parts that change, like a name, a date, a dropdown choice, or the page itself, from Fixed to Variable. Every run after that brings its own values.

Source: https://stepwork.com/variables

## Try it: make a variable

_Visual: A recorded flow fills in a New user form: it opens the page, types a name and a start date, selects a department and two groups, and clicks Create user. Each of those values can be switched between Fixed and Variable, and Run it fills the form for three people from a list._

Fixed steps repeat with the value you recorded. Variable steps take the value from that run's row.

## The same flow, with new values every run.

Each flow here was recorded once in StepDemo, our sandbox copies of systems like Entra, Teams, and Jamf Pro, then run again with different values. Pick a kind of value to see what changed.

- **Typed text:** Five typed fields get new values on the run. One of them, Groups, takes two group names at once. Filmed flow: Create a new hire's account in Entra ID with their groups. Sign-in name: recorded with sienna.dubois@acme.test, run with mateo.sato@acme.test. Name: recorded with Sienna Dubois, run with Mateo Sato. Job title: recorded with Support Specialist, run with Solutions Engineer. Department: recorded with Customer Success, run with Sales. Groups: recorded with Customer Success - All, Customer Success - Support queue, run with Sales - All, Sales - CRM users.
- **Long text:** The whole reply is one variable, so each request gets its own message in its own thread. Filmed flow: Reply in the Teams thread. Reply: recorded with Done. You're all set, reply here if anything doesn't work., run with Done, Grace. You're a delegate on events@acme.test now..
- **Dates:** The date of birth is typed fresh for each member, next to their member ID. Filmed flow: Check a patient's coverage. Date of birth: recorded with 08/30/1971, run with 03/12/1984.
- **Numbers:** Pieces and weight change with each shipment. The freight class was left fixed, so the run picks class 85 again. Filmed flow: Get an LTL rate quote. Pieces: recorded with 3, run with 6. Weight (lb): recorded with 640, run with 1450.
- **Searches and filters:** The filter is the variable, so the same flow reads any client's standard. Filmed flow: Look up a client's new user standard in IT Glue. Client: recorded with Fourth Coffee, run with Alpine Ski House.
- **Codes and PINs:** Each run locks a different Mac and sets its own unlock PIN. Filmed flow: Lock a leaver's Mac in Jamf Pro. Unlock PIN: recorded with 482916, run with 735204.
- **The page it opens:** Nothing is typed in this flow. The variable is the user in the page address, so each run opens a different person's page. Filmed flow: Make a user register MFA again in Entra ID. User: recorded with marcus.chen@acme.test, run with omar.haddad@acme.test.

## A value can come from wherever the work starts.

A variable takes its value from a list, another app, a document, or the step before. The flow that uses it runs the same way every time.

**From one app into another:** In this onboarding procedure the new hire's details are read from the HR system, the app bundle from a spreadsheet, and the work email from the account that was just created. Each one lands in a field in another app.

- Workday, New hire: name, department, fills Microsoft Entra ID, New user: name, department groups.
- Excel, App bundle: app and role, fills Internal tool, Add user: role.
- Microsoft Entra ID, New account: work email, fills Internal tool, Add user: email.

Seven places a value can come from:
- **A list or table:** Keep a table on the Variables page. Stepwork runs the same steps for each row.
- **Another app's screen:** An Extraction reads values, tables, and states off a screen and passes them to the next step.
- **A document:** File processing turns PDFs, scans, and emails into fields the next step can use.
- **A signal from another system:** When a webhook starts the Procedure, the fields it sends become variables.
- **A person's decision:** An Approval passes on Approved, Approved by, and Decided at.
- **A value you type once:** Type a value on the card and every run uses it until you change it.
- **Whoever starts the run:** A person, or an AI assistant connected through Stepwork MCP, starts a run with the inputs it needs.

## Read it once. Use it in every card that needs it.

On the canvas, each card shows what it takes in and what it passes on. Link an output to an input once, and every run carries the value across.

_Visual: The day-one onboarding procedure on the Procedure canvas: seven cards, with a wire for each value that passes from one card to another._

- **One value can fill any number of inputs:** Here the department goes to two cards, and the manager's message is filled with three values from two cards.
- **A table repeats the work for each row:** Here the app bundle has nine apps, so the two cards in the loop run once for each app.

Follow the values through a day-one onboarding procedure: where each one is read, which cards use it, and what each card passes on.

- **Four values come in:** The first card reads each new hire from the HR system and passes on four values: their name, department, manager, and start date. Any card after it can use them.
- **Two of them fill a form:** The name and the department drop into the recorded flow that creates the account. The card passes on something new: the work email it just created.
- **One value, used twice:** The same department feeds a second card, which reads that department's app bundle. Using a value in one place doesn't use it up.
- **A rule reads a value:** The rule checks each app's name to pick a path. It uses the value and passes nothing new on.
- **Values from two cards meet:** This card takes the work email from the account card, and the app and role from the bundle. It runs once for each app in the bundle.
- **Results roll up:** The Summary card collects the result for each app and passes on one new value: a short list of what's ready.
- **One message, three values:** The message to the manager is filled from the first card and the one before it: the manager and start date read at the very start, and the summary written a moment ago.

## What each card takes in and passes on

Every card type on the canvas works with variables. Most take values in and pass new ones on.

- **Extraction:** Takes in: Values from earlier steps. Passes on: The fields and tables it reads.
- **Execution:** Takes in: Values such as URLs, names, and IDs. Passes on: A status, a file path, or a downloaded file.
- **Webhook:** Takes in: Usually nothing: it starts the run. Passes on: Fields from the signal another system sends.
- **Rule logic:** Takes in: Values to check in its conditions. Passes on: Nothing new: it picks the path.
- **Procedure:** Takes in: Starting values for the nested Procedure. Passes on: The nested Procedure's outputs.
- **Slack:** Takes in: Text and IDs for the message.
- **API:** Takes in: Values for the URL, headers, body, and auth. Passes on: Fields from the response.
- **Approval:** Takes in: Values to show in the approval message. Passes on: Approved, Approved by, and Decided at.
- **Wait:** Takes in: An amount of time, or a date and time. Passes on: Nothing: the next card runs when the wait ends.
- **Lookup:** Takes in: One value to match against a table. Passes on: The matched row's other columns, plus Found.
- **Data parsing:** Takes in: Fields from earlier cards and tables from the Variables page. Passes on: Each result you mark as an output.
- **Script:** Takes in: Text, number, boolean, or JSON values. Passes on: Named outputs and exit_code.
- **File processing:** Takes in: A file path from an earlier step. Passes on: Typed fields, categories, filled PDFs, or split documents.
- **AI:** Takes in: Values for the prompt. Passes on: The text it generates.
- **Summary:** Takes in: Values for the summary instructions. Passes on: One summary result.

## Questions about variables

**Q:** What can I turn into a variable?

The values you typed, picked, or opened while recording: text, dates, numbers, a search or filter, a dropdown choice, and the page address itself. After recording, switch any of them from Fixed to Variable. The steps you leave fixed run with the values you recorded.

**Q:** Do I have to record the flow again when a value changes?

No. Variables let one flow run with different values, such as URLs, account names, tiers, and IDs, without recording it again.

**Q:** What kinds of data can a variable hold?

Text, numbers, true or false, and JSON. A table counts too: keep one on the Variables page and its rows can drive the cards that follow.

**Q:** Where do a run's values come from?

From a list or table on the Variables page, from a screen or document an earlier step read, from a webhook, from an approval, or from whoever starts the run. Given a table, Stepwork runs the same steps for each row.

**Q:** Can one value be used in more than one place?

Yes. A value read once can fill fields in several apps, a rule, a message, and a nested Procedure. In the onboarding example on this page, the department goes to two cards and the manager's message is filled with three values.

**Q:** Do passwords go in variables?

No. Passwords are never pasted into procedure variables. Stepwork reads credentials from 1Password only when a flow runs, and stores a reference to the vault item, not the password.

---

This is the Markdown version of https://stepwork.com/variables, built from the same copy as the page. Everything about Stepwork for AI tools: https://stepwork.com/llms.txt. Book a demo: https://calendly.com/shaun-maclellan/1-1-w-shaun-stepwork
