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 / Is there a way to edit...
Power Automate
Unanswered

Is there a way to edit your flows scripts directly without using the GUI?

(0) ShareShare
ReportReport
Posted on by 87

I am building a fairly complicated flow that access Salesforce (SFDC) and SharePoint (SP) using the HTTP widgets instead of the standard SFDC and SP widgets.  This is an effort to improve performance.

 

My issue is that the basic flow to update existing and insert new records in to SP has 17 steps (See blow for a graphic).  I need a total of 9 of these flows.  The only major differences between the flows are the List Name and List Columns Names.  The rest of the flow is the same.

 

Is there a way to edit the flow's script directly instead of either building each step manually or copy/paste/edit each flow?

 

I tried building a parent / child flow but the lack of passing JSON objects with dynamic variables did not work..

 

Any ideas?

 

Thanks for your time

 

Categories:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,081 on at

    Did you ever heard a word "parameter"?

    Create a string variable for "List Name" (1st parameter) and an array variable for "List Columns Names" (2nd parameter).

  • AlexLindberg Profile Picture
    87 on at

    I am aware of Parameters and I use them for SP URL and $batch (__api/web) stings.  The issue is that reading or inserting/updating specific columns requires knowledge of the SP list.  Lists1 does not have the same structure as List2, etc.  As an illustration, below you will see parts of a single flow to Update existing SP Rows:

     

    Most SP access items are kept in a compose settings file

     

    To get Title and ID from a SP List:

    AlexLindberg_0-1711131502299.png

     

    Build the template body of the HTTP Update 

    AlexLindberg_1-1711131638269.png

     

    Setup the |RowData| to update the SP rows ( It will be inserted in the above template)  This is the major stumbling block to pass to a child flow.  Body is an array of items to be updated and the ID and Title are from the settings file with some string manipulation.  The SP Columns (Left Side) and the data to be inserted (Right Side). The Right side is based on item()?['field name'] from the Body value.

    AlexLindberg_2-1711131702665.png

     

    Send the SP Update using HTTP. 

    AlexLindberg_3-1711131797263.png

     

    Much of the above is repeated for the Insert Rows part of the flow.

     

    This then is repeated 8 times in my case to UpSert 8 SP lists.  That is why I am looking for either the ability to drop into the flows script to copy and modify actions OR the capacity to pass objects to child flows.

  • VictorIvanidze Profile Picture
    13,081 on at

    Switch your Select action "Gererate..." to the text mode. Use this JSON object as the second parameter.

  • VictorIvanidze Profile Picture
    13,081 on at

    Hi @AlexLindberg,

    any progress? 

  • AlexLindberg Profile Picture
    87 on at

    No - While you can view the underlying code, I have not found a way to edit the code and/or use the code (import) to create a new flow.

     

    I guess my issue is that I come to this from a pure coding POV and expect things like self-referencing variables (think i++), etc.

  • AlexLindberg Profile Picture
    87 on at

    to @VictorIvanidze - There are a couple of issues creating a JSON structure to pass to a child flow

     

    - Child flow triggers don't natively support JSON objects.  You can work around this using something like bas64(string(Object)) then in the child json(base64ToString(triggerBody()['text']))

     

    - Building JSONs with dynamic variables in a compose statement doesn't work because functions like

     @{item()['fieldname']} 

    doesn't resolve.  It has been suggested by @PabloRoldan  here, that something like

     "@@{item()['fieldname']}"

    might work but have not tried this approach

  • VictorIvanidze Profile Picture
    13,081 on at

    Hi @AlexLindberg,

     

    have a look at this:

    VictorIvanidze_0-1711649897652.png

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 976

#2
Valantis Profile Picture

Valantis 863

#3
Haque Profile Picture

Haque 547

Last 30 days Overall leaderboard