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 Automate
Unanswered

'Create Flow' error

(0) ShareShare
ReportReport
Posted on by 38

I'm trying to use the Create Flow connector to reproduce an existing flow for new Sharepoint subsites. Initially I have used a Get Flow connector to get the JSON definition of the desired flow. However when I paste the JSON into the Create Flow box I get an error message saying "The flow cannot contain unsupported parameter function expressions. The expressions must be string literals". I have made zero changes to the JSON but for some reason it is being rejected. Has anyone else encountered this?

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    Is there any reason why you aren't just using the export and import feature in the Flow UI?

  • finnecs Profile Picture
    38 on at

    What do you mean by this?

  • Community Power Platform Member Profile Picture
    on at

     

    The following option is there to export a flow to a zip file. 

     

     

    Export Flow.png

     

    Then you import the flow using the import option

     

    Import flow.PNG

  • finnecs Profile Picture
    38 on at

    I'm trying to automate the process so that when a new site is created the new flow will be generated in the background

  • PieterVeenstra Profile Picture
    13 on at

    You might want to have a look at this series of posts.

    https://dylanhaskins.com/power-platform-alm-devops-part-1/

     

    The whole ALM story is not complete yet. The main battle is the connection between different environments.

  • finnecs Profile Picture
    38 on at

    I have used this connector in a similar fashion successfully but this is my first time seeing this error message

  • Verified answer
    finnecs Profile Picture
    38 on at

    Just as a follow up I was able to find a workaround - I was wanting to insert dynamic content into the JSON in the form if ID numbers from a Sharepoint list (these become the new Sharepoint site url, so are integral to automating the creation of flows that will action from said site). I couldn't really understand why it wasn't working, but my suspicion was that when I 'exposed' the JSON to the UI some portions of it were automatically converted to dynamic content which interfered with how it was read. As such I tried to keep the entire JSON wrapped up in a dynamic content object, and was able to make it work with a few Compose connectors:

     

    1. use a Get Flow connector to find the 'template' flow
    2. use Compose to convert the Flow definition from above to a string
    3. Compose to find & replace the template site url with the dynamic content
    4. Compose to convert the string back to JSON
    5. link the output of my last Compose connector to the definition field in the Create Flow connector. 

    I'm sure there'll be a slicker way but this works at least.

  • DaveLewko Profile Picture
    3 on at

    Thanks for sharing this very useful workaround. I used the same with success and it was really hard to get info about the Create Flow action with Power Automate Management connector because theses search terms are very common. Search engines weren't really helpful with it.

  • mhuyser Profile Picture
    27 on at

    @finnecs has the right solution and it's much more clear than some other blog posts or videos on this subject. The Flow Definition is particularly complicated and annoying to work with. I'm responding to this thread in order to provide some more detail on how I've implemented the solution.

     

    First, my Base Flow is triggered by changes in a document library. My project is to streamline the creation of new document libraries based on user inputs, which will also create a new flow dedicated to that new library.

     

    I used a select data operation to map the connection references from the base flow:

    mhuyser_0-1658370465033.png

     

    The Flow Definition was prepared similarly to what @finnecs describes, but with a single compose connector:

    mhuyser_1-1658370574128.png

     

     

    json(replace(string(outputs('Get_Base_Flow')?['body/properties/definition']),body('Parse_JSON_2')?['d']?['Id'],body('Parse_JSON')?['d']?['Id']))

     

     

    As @finnecs described, the first step is to convert the File Definition from the Get Base Flow connector to a string.

    The second step was replacing the Library Id from the original flow with the new Library Id that was just created (what is replaced in each project will be highly dependent on what the copied flow is intended to do). The third part returns the format to JSON so that the output of this connector can be called in the Create Flow connector

     

    mhuyser_2-1658370990919.png

    (The Flow Definition is populated by the output of Compose 2, the connectionReferences is populated by the output of Select)

     

    For informational purposes on how I collected the Library IDs, I created separate HTTP requests and then a companion Parse JSON connector for easy referencing. The image below illustrates the one set for the new Library. Note that the Output reference in the Uri field is calling a Library Name that was defined earlier in the flow. The same field in the second set is not dynamic since it only needs to know the template library name.

    mhuyser_3-1658371596080.png

     

     

     

  • andersonpimente Profile Picture
    11 on at

    I got the same error message when I was trying to save an existing (and working) flow.

     

    It was because I deleted an action and replaced it with a child flow call, using the same name. It seems that, internally, the deleted action still exists and is validated against its parameters.

     

    I gave new names to the child flow calls, saved the flow and refreshed the page. Then I could rename them back and save again.

     

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