Tokens
Flow Tokens allow users to pass information between different Flow cards when creating their Flows.
Tokens are typed variables that can be used throughout a Flow. A token is either:
Local β Attached to a Flow's trigger card, for example the name of the user that came home.
Global β Available anywhere, for example the current time.
Both tokens can be used in a Flow card's argument, such as a textfield.

Local Tokens
When triggering a Flow, some information might be useful to use in that Flow. For example, when it starts raining, the mm/hour could be a token.
Tokens have a pre-defined type, which can be either string, number, boolean or image.
Users can use Flow Tokens in compatible Flow Arguments, such as a text field for string tokens. This way, the user can make advanced flows with variables. To add tokens to a Flow card, just add a property tokens to your Flow card manifest.
And when firing your trigger, add them as second argument:
Tokens for Advanced Flow
A Then-card can optionally return tokens in an Advanced Flow. Similar to a When-card, specify the tokens property as an array, and return an object in the run-listener of your Flow card.
Global Tokens
A token can also be registered globally, so they can be used in any Flow. This means the token can be used without requiring the app to trigger the Flow. For example a weather app could expose the current temperature as a global token.
By default a device's capability are registered as global tokens.
Image Tokens
Certain applications might want to share images between Flows, e.g. a webcam that made a snapshot, or a Chromecast that wants to cast an image. A token with type image can be used here.
Last updated
Was this helpful?