You can not store data in a flow into an environmental variable. You create the Environmental variable in your settings file and store a constant in it. Then in your flw you can access that value.
You can use persistant data and store that - and now that data will remain over reboots or shut down/restarts of NR. See this in the Documentation and have a read of this thread