Whoever told you this, should be fired immediately -
Cloudflows cant use environment variables at all and therefore need to be published everytime i push the solution from DEV to PROD.
Because its a complete load of Horse Pucky.
Not true at all... I would say you need to ignore whoever is teaching you now and find someone else.
1. You can create Environment Variables that point to anything (Connections, Urls, Lists, Tables, you name it)
2. You can define an Environment Variable that is an ID
Example: I have Microsoft Forms, that trigger Power Automate Flows, that store data in SharePoint, in a list
I have
- A Connection Environment Variable, which I can use in place of the URL for SharePoint, but I must select that Environment Variable
- A string Environment Variable points to the proper List
- A string Environment Variable, where I put the GUID (the same type of ID you mean for the Flow, but mine is for the Microsoft Form)
When I click on the Trigger for the Form, it first wants me to pick the 'Label/Name', I instead say, insert Dynamic Content, then pick my Variable
When I deploy from environment to environment, I simply update the values of the Variables as I deploy.. but it doesn't make me do new connections or fresh stuff its part of the process.
I never have to change my forms, my flows, my actions, my connections nothing.
and after deploying 1 time, I never have to do these steps again either unless I specifically tell it I want too.
So please fire whomever told you that bull :-) and follow what I said above
you'll be fine.