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 / Set-SPOSiteScript : Ac...
Power Automate
Unanswered

Set-SPOSiteScript : Action 1 (triggerFlow) is invalid. Parameter url has an invalid value.

(0) ShareShare
ReportReport
Posted on by 4
While adding site script into site design in PowerShell, I'm getting this error message(attached). Observed that this issue is happening only when I use the flow(When an HTTP event is received trigger) created in Developer(Environment Type). However the same flow I can add it into Site  script from Default environment without any issue.
 
When I compare the two HTTP URLs( Default and Developer Environment Type) there is a change in url. 
 
Default Env. Type HTTP URL : 
 
Developer Env. Type HTTP URL:
 
"actions": [
        {
            "verb": "triggerFlow",
            "url": "https://d2d0c3027........ac57196706544e.08.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/e38d..........42a1916ffa681234561/triggers/manual/paths/invoke/?api-version=1&tenantId=tId&environmentName=12345678-...........5-ac57-196706544e08",
            "name": "site creation event",
            "parameters": {
                "event": "site creation",
                "product": "SPO"
            }
        },
 
Is there any limitation while using Developer Environment HTTP URL in Site Script? or any fixes/suggestions would be really appreciated. Thanks.!
Categories:
I have the same question (3)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
     
    In both flows you used a When a HTTP request is received trigger action? And what are you using in the who can trigger the flow setting?
     
    I assume you followed the steps from this article?
    https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-trigger-flow-tutorial


     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, LinkedIn, Bluesky profile or Youtube Channel
  • GL-21071454-0 Profile Picture
    2 on at
    Has anyone been able to get this to work? I've created a simple Flow (per https://github.com/SharePoint/sp-dev-docs/blob/main/docs/declarative-customization/site-design-trigger-flow-tutorial.md) and tried with "Anyone" and "Any user in the tenant" and nothing seems to work. I can call the endpoint directly using Invoke-RestMethod and that works fine but attempting to register the site script always throws the error. I also tried converting the Flow to a solution and publishing but that didn't make any difference. Using Add-SPOSiteScript and Add-PnPSiteScript both throw the same error.
  • CU24071922-2 Profile Picture
    2 on at
    Did anyone found solution to this, im also having same problem for my pre prod environment
  • Sometimes helpful Profile Picture
    2 on at
    Adding site scripts is purely a remote function, meaning the code is executed on the SharePoint servers using your raw input (title, description, content). There appears to be some URL validation happening on the server, perhaps as simple as validating that a URL ends in ".logic.azure.com" (or ".us" in gov clouds). 
     
    My guess is that URLs being generated with those environment-specific hostnames is a new feature in Power Platform, and the validation on the SharePoint side was not updated. Unclear if there is a way to control that. It was also asked here: Webhook URL difference: prod-logic.azure.com vs environment.api.powerplatform.com.
     
    In the GCC High tenants (which generally seem "a few versions behind"), the When a HTTP request is received trigger always produces URLs with the same hostname, whether the Flow is in the default environment or another, and regardless of that environment's type (including Developer types) or being part of a solution.

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard