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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trigger manual flow af...
Power Automate
Suggested Answer

Trigger manual flow after moving solution from one env to other env

(1) ShareShare
ReportReport
Posted on by
Hi Team, Please let me know how to Trigger manual flow after moving solution from one env to other env without manual step by run button from powerapps or powerautomate. This flow update environment variable by triggering http powerautomate flow so this Ev will use by javascript for export button and schedule flow as well.

Can you give me solutions for this?
Categories:
  • Suggested answer
    Mohsin Ali Profile Picture
    2,862 on at
    Hello @Teja KM -  I would avoid creating a manual flow just to update the environment variable after every deployment. Make the value part of your ALM/deployment configuration instead.
     
    If you are using Power Platform Pipelines or Azure DevOps, configure the target environment variable value through the deployment settings rather than running a manual flow after import. Microsoft supports pre-populating environment variables and connection references during automated solution deployment.
     

    For your scenario, I would recommend:

    • Keep the environment variable inside the solution.
    • Set its value separately for DEV/UAT/PROD during deployment.
    • If additional logic really needs to run after deployment, use Power Platform Pipeline extensibility and trigger a post-deployment automation instead of asking someone to manually run the flow.
    • Your JavaScript and scheduled flows can then read the environment variable normally.

  • Suggested answer
    M Bilal Khan Profile Picture
    1,172 on at

    Yes, this can be automated. You don't need someone to open Power Automate and press Run after every solution deployment.

    If the purpose of the flow is to initialize/update an environment-specific value after the solution is imported, I would use a solution-aware cloud flow with a Dataverse trigger rather than an HTTP-triggered flow that has to be manually invoked.

    Microsoft specifically documents this scenario: if you want a flow to start automatically after a solution is imported, use the Microsoft Dataverse connector when creating the flow.

    A typical pattern would be:

    Solution import → Dataverse trigger → Update environment/configuration → Flow completes

    For example, you could use a Dataverse trigger such as When a row is added, modified or deleted on a small configuration/control table. The deployment process can create/update the appropriate configuration row, which causes the flow to execute automatically.

    Also, if the value you're updating is genuinely environment-specific, consider whether you need a separate HTTP flow at all. Environment variables are designed for values that change between environments, and their values can be supplied during solution import or through a deployment pipeline.

    If you're using Power Platform Pipelines/ALM, an even cleaner architecture is:

    Dev → Solution → Pipeline → Target Environment → Environment Variable value

    Then your JavaScript and scheduled flow can consume the environment variable directly, without requiring a post-deployment manual run. Pipelines support providing/validating environment variables and connection references during deployment.

    One thing to keep in mind: if you change an environment variable value directly in the target environment, an existing flow may continue using its previous value until the flow is saved or turned off/on. ALM-based updates are preferable for deployment scenarios.

    So I would first look at replacing the "HTTP flow + manually run after import" pattern with either:

    • Dataverse-triggered initialization flow, if something actually needs to execute after deployment, or
    • Environment variable + solution/pipeline deployment, if you're simply setting environment-specific configuration.

    The second option is usually cleaner if the value is just configuration rather than something that needs processing.

  • Suggested answer
    Henil Profile Picture
    720 on at

    You don't need JavaScript to automatically click the Run button.

    If the flow currently uses Manually trigger a flow, importing the solution into another environment will not automatically trigger it. Something still needs to call the flow.

    If this flow needs to run once after deployment, the better approach is to call it as part of your deployment process. You can keep the main logic in a Child Flow inside the solution and trigger it from a deployment/parent flow after the solution import is completed.

    If you don't have an automated deployment process, another simple option is to use a Recurrence trigger and control when it should run using an Environment Variable.

    So I would avoid JavaScript for clicking the Power Automate Run button. Automating the flow trigger/deployment process will be more reliable.

    If this is helpful, please consider marking it as a Verified Answer so it can help others with a similar requirement.

  • Suggested answer
    Mohsin Ali Profile Picture
    2,862 on at
    Hello @Teja KM - I think rather manual trigger you can try following triggers to automatically trigger the flow. 
     
    If you're doing deploying through Power Platform pipelines, then your trigger should be something like below.  Because all of the deployments runs are stored in following table, so you can easily track what is being deployed and add your business logic to update the EVs.
     
     
     
     
     
     
     
     
     
    In case, you're doing manual solution import, then your trigger should be something like below;
     
     
     
     
     
     
     
     
     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard