Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Instant workflows will not run in the new environment – ​​workflow templateId is required

(1) ShareShare
ReportReport
Posted on by 4
Instant workflows are not executed in the new environment,
the integrated "Automate" function of SharePoint is tightly integrated into the standard Power Platform environment and does not natively recognize workflows that are provided in other environments.
 
Alternatively, I tried to trigger the workflow manually using buttons in JSON format. Normally, the EnvironmentID & WorkflowID were sufficient in the default environment. Now, when I call it in the new environment (not the default environment), I get the error message: Required parameter "templateId" Is missing.
 
All attempts to read the workflow templateID have failed.
Where can this templateId be read for the explicit workflow? Does anyone have experience with this?
Categories:
  • OM-17010829-0 Profile Picture
    OM-17010829-0 4 on at
    Instant workflows will not run in the new environment – ​​workflow templateId is required
    thx, trice602
    Unfortunately, these solutions do not provide an answer to the templateId.

    The Workflow URL does not contain the templateID, only the EnvorinmentId and the WorkflowId.

    After exporting the workflow, no templateId can be found in the JSON.
  • trice602 Profile Picture
    trice602 11,698 on at
    Instant workflows will not run in the new environment – ​​workflow templateId is required
    Hi,
     
    I haven't tried this specifically but looks pretty good.  Check this out!
     

    Steps to Find the templateId for a Workflow

    1. Open the Workflow in Power Automate

    1. Go to the Power Automate Portal: https://make.powerautomate.com.
    2. Navigate to the environment where your workflow is located.
    3. Find your workflow in the My Flows or Solutions section.

    2. Check the Workflow URL for the templateId

    1. Open the workflow for editing.

    2. Look at the URL in your browser's address bar. The URL will include a query string containing the templateId.

      Example:

      https://make.powerautomate.com/.../details?name=workflow-id&templateId=<your-template-id>
      • The templateId will appear after templateId= in the URL.

    3. Export the Workflow and Inspect the JSON

    If the templateId is not visible in the URL:

    1. Export the workflow as a .zip file from the Power Automate portal.
    2. Extract the .zip file.
    3. Open the definition.json file inside the package.
    4. Search for the templateId field in the JSON file.

    Adjust the Button JSON in SharePoint

    Once you have the templateId, update your custom button in SharePoint with the correct parameters.

    Example JSON for a button:

    {
    "elmType": "button",
    "txtContent": "Trigger Workflow",
    "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"templateId\":\"<your-template-id>\",\"environment\":\"<environment-id>\",\"flowId\":\"<workflow-id>\"}"
    },
    "style": {
    "background-color": "blue",
    "color": "white"
    }
    }
    • Replace:
      • <your-template-id> with the templateId you found.
      • <environment-id> with your new environment's ID.
      • <workflow-id> with the ID of the workflow.

    Test and Verify

    1. Save the updated JSON in SharePoint.
    2. Ensure the button is rendered correctly.
    3. Click the button to trigger the workflow and verify that it executes successfully in the new environment.

    Additional Notes

    • Ensure that the user account triggering the flow has access to the environment and workflow.
    • The executeFlow action in SharePoint is tightly coupled with Power Automate, and ensuring these parameters are correctly passed is essential for the flow to execute.
     

    ------------------------------------------------

     

     

    ⭐ If this was helpful, please like and mark as a verified answer to help others find this too!

     

     

    Always glad to help! 💯💯💯💯💯

     

    Tom

     

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard