Invoke One Flow From Another Flow (Call Child Flow from Parent Flow)

    In this example we will be creating SharePoint List items by child Flow and Parent Flow. Here we will call Child flow from Parent flow & both will create new items in List.

Create Child Flow:

           Child flow will be triggered "when HTTP Request received" & it will create new SP list item. 

  •  To Create Flow >  From "SharePoint admin center" > Power Automate


  • Power Automate site > Create > Instant Flow

  • Enter Flow Name & choose how to trigger the workflow "when HTTP Request received", click Create.


  • Click on the header & click on payload to generate schema 

  • Enter {"Title":""} & it will generate schema like below. then click "New Step"


  • In new step > Search "SharePoint"  > Select "Create Item" > select SP URL & List name

  • For the Title field when we click it will suggest to add Title from Parent flow(which we created in 1st step & Note: This title value passed from Parent flow). Click Save
  • Once we saved it will give "Http Post URL" .This URL will be called in Parent flow(to invoke this child)


Create Parent Flow & Call Child Flow:

    We will create parent flow & call child flow.  Parent flow will create one list item & child flow will create another list item.
  • To create Parent flow >Click "Create" > Instant cloud flow > Enter Flow Name > select trigger as "Manually trigger a flow" > Create


  • STEP 1 (Invoke Child Flow using HTTP):
    Click "New step" > type HTTP > select "HTTP" action 
  • Select Method as post, enter Child Flow URL (copy from child flow. My flows> ChildFlow > Edit> here we can find the url), Add headers and body(Title text of child flow list item) like below image


  •  STEP 2: (Create List Item from Parent Flow)
    Click "new step" > search "SharePoint" > select Action "Create Item"> Select SiteURL, List  & Enter Title & Save (Create Item From Parent Flow). Now parent flow is ready.


Run Parent Flow:

  •  Click On "My Flows"> On Parent Flow click "Run"> Click "Continue" & "Run" > Now we can see 2 items were created in SP list (1 from Child Flow & 1 from Parent Flow).


To check Flow running history:

  • Go to "My Flows" > select Flow > Options > Run History > check the status & click time to check full details




Refer this video for more details

Comments

Popular posts from this blog

Upload Single/Multiple file by using the REST API and jQuery SharePoint 2013

Add content type to SharePoint List/Library using REST API

A type named 'SP.Data. could not be resolved by the model error