by Hub Space
Version 1 (February 13, 2023)
Download (393 downloads)
This is an example on how to store and access variables in a flow description field.
This tutorial uses the automate content provider to get the description of a flow and extract variables inside a dictionary.
Variables are stored in a json encoded dictionary, called the environment (env) variable.
The flow can also load variables from the description field of other flows on you device.
The json encoded dictionary in your flows description must be opened with @.env at the beginning of a new line and closed with #.env at the end of a line.
Inside the flow you have access to the env variable containing the json decoded dictionary. With all the key value pairs from the flow description.
-------- Some visual separation?
@.env{
"version": "1.0",
"author": "HubSpace",
"example": ["Some text", 5],
"show": true,
"flowBeginningStatement": 14
}#.env
Env section does not have to be at the end.
Just ensure to not start a new line with @.env before the actual variable block. There can only be one env block.
5 stars | 5 | |
4 stars | 0 | |
3 stars | 0 | |
2 stars | 0 | |
1 star | 0 | |
Reports | 0 |
Rate and review within the app in the Community section.