# ask-the-community

Nizar Hattab

08/22/2023, 9:49 AM
Hi everyone, I am trying to automatically register and deploy workflows, but I came across an issue of Environment Variables. I would like to register workflows with their env vars through a file (yaml or json). I've come across this pr which added environment config to launch plans, but couldn't find documentation of how to use this. Any suggestions, ideas on how to achieve that (passing env vars on registration or launchplans)?

Samhita Alla

08/23/2023, 5:32 AM
You can send environment variables to the
pyflyte run
command using the
flag: --envs JSON OBJECT OR JSON/YAML FILE PATH Environment variables to set in the container But I don't think it's available in the
pyflyte register
command. cc @Kevin Su
You should also be able to send env variables via flyte remote.

Kevin Su

08/23/2023, 6:16 AM
you can also set the env in @task
@task(env=<read json file>)