web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get my environm...
Power Automate
Unanswered

How to get my environment Name in power automate

(1) ShareShare
ReportReport
Posted on by
Hi Team,
 
I am working on a flow where I need to get my environment name and write it in a dataverse table.
 
used workflow()['tags']['environmentname']
 
But this expression returned environment ID.
 
I need this flow to be dynamic. As I will be exporting and importing it in a different user's environment, I need the flow to get the current environment name.
 
Please help in getting this.
 
Thanks in advance,
Naveen Kumar A.
Categories:
I have the same question (0)
  • David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at
    I forget where I found this information, but you can probably get the information with a portion of this expression:
     
    concat(concat(concat(concat('https://make.powerautomate.com/environments/', workflow()?['tags']['environmentName'],'/flows/',workflow()?['name'],'/runs/',workflow()?['run']['name']))))
     
    You need the highlighted portion. The above generates the link to a specific flow run.
     
    This expression generates a link to the workflow: concat(concat(concat('https://make.powerautomate.com/environments/', workflow()?['tags']['environmentName'],'/flows/',workflow()?['name'],'/details')))
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,315 Super User 2025 Season 2 on at
    HI,
     
    What actions are you using to get the Environment Name? You have to leverage either
     
    a) create an environment variable that has it set to the current environment (updating it on import of the solution so the value is dynamic on install of the solution)
     
    b) be an admin and use the Admin Connector actions to get the environment name 
     
    Or you can follow this.
    Power Automate: Find the current environment – Ben Prins but again you are adding failure points and many more action costs but it works great as do the other solutions.
     
    Cheers
     
     
  • David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at
    Here is a reference to the tag information that is available: How to get Power Automate flow information directly in the flow run. If am reading the information correctly, the display name of the environment is not returned in a workflow run. To get that information it looks like you will need to use the list my environments action and if possible, filter it on the name value.
  • Chriddle Profile Picture
    8,436 Super User 2025 Season 2 on at
    If your environment list is static you can simply add a Compose with a JSON like this
    {
    "<EnvironmentID1>": "<EnvironmentName1>",
    "<EnvironmentID2>": "<EnvironmentName2>",
    "<EnvironmentID3>": "<EnvironmentName3>"
    }
     
    and access it with the expression
    outputs('Compose')?[workflow()['tags']['environmentname']]
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard