how do you set and get flow user states
@Ask Inkeep how do you set and get flow user states
3 Replies
Thanks for tagging me @rubenf. I'll look through relevant sources and get back to you shortly.
-----------------------------
While I generate an answer, here are some sources that might be helpful:
* Within Windmill: Not recommended
* set flow user state POST /w/{workspace}/jobs/flow/user_states/{id}/{key}
* Architecture and Data Exchange
* Resources and Resource Types
-----------------------------
Answer
To set and retrieve user states within a flow in Windmill, you can use the provided TypeScript and Python examples as guidance.
For setting a custom flow user state, you can use the following TypeScript and Python code snippets:
TypeScript:
Python:
(1)
These examples demonstrate how to set a value using
setFlowUserState
and then retrieve it with getFlowUserState
within the same flow. These functions allow for the storage of data across steps in a flow, accessible globally within that flow.
For more details on how to programmatically interact with flow user states via the Windmill API, please refer to the set flow user state (2) and get flow user state (3) documentation.Glad I could be helpful. Feel free to create a new thread with any new questions you may have.