Home > Power Platform > Power automate | Child flows | ‘NestedWorkflowDoesNotContainResponseAction’ error

Power automate | Child flows | ‘NestedWorkflowDoesNotContainResponseAction’ error

While running a Power automate Child Flows scenario, encountered the following exception.

. To wait on nested workflow ‘xxx-xx-xxxx-xxxx’, it must contain a response action.

Flow Error

To explain the cause of the error and the fix, let me explain my Power automate Child Flows scenario.

  • I’ve 2 Dataverse tables Students and Enrollments.
  • Enrollments table has look up column of Students table.
  • In my flow, I receive interested students ‘EmailIds’ for enrollment in the comma separated format. I read the emails and create Enrollments records.
  • To read the email id’s and create Enrollments records, i’ve created 2 flows,
    • Parent – Enrollment Process – Triggers the child flow ‘Child – Complete Enrollment’ by passing comma separated Email Ids.
    • Child – Complete Enrollment – Reads the comma separated Email Ids passed by ‘Parent – Enrollment Process‘ flow and create rows in Enrollments table.

Following is the step by step process, to create my above Power automate Child Flows scenario.

Lets create the ‘Child flow (Child – Complete Enrollment)’ first.

Create Child flow (Child – Complete Enrollment):

As the ‘Child – Complete Enrollment flow’ reads the comma separated email id’s and creates records in Enrollment table, following are actions.

  • Create an Instant Flow (Child flow should be a Instant Flow).
  • Add 2 input parameters to read the EmailId’s passed from Parent flow.
    • InterestedEmails : Comma separated Email of interested Students to enroll.
    • UninterestedEmails : Comma separated Email of uninterested Students to enroll.
  • Use Split function with Apply to each to read the comma delimited Email ids to array.
    • Below I am splitting InterestedEmails parameter using comma(,) delimiter.
  • Now we will have array of interested Student ‘Email Ids’ after applying the Split function.
  • As a next step, we need to fetch the matching Student record by ‘Email Id’ from Dataverse, use the List Rows action.
    • We need the ‘Student’ because to create the ‘Enrollment’ record, we need to set the ‘Student’ lookup.
  • I’ve renamed the List Rows action to ‘GetStudentbyEmail’ and in ‘Filter rows’, I am passing the ‘Email Id’ from Split function.
  • ‘GetStudentbyEmail’ would return the matching ‘Student’ which will help us to create ‘Enrollment’ record.
  • So add a Add a new row action to create ‘Enrollment’ record.
    • Notice, I set the ‘Student’ lookup with ‘StudentId’ returned from previous ‘GetStudentbyEmail’ action.
  • Save the flow.

Now that we have the Child flow (Child – Complete Enrollment), lets create a Parent flow (Parent – Enrollment Process).

Create Parent flow (Parent – Enrollment Process):

Parent flow can be of any type (i.e., Automated/Instant/Scheduled). For this example, I am taking Instant flow.

  • Create an Instant flow with 2 input parameters.
  • Add a ‘Run a Child Flow‘ action and select our ‘Child – Complete Enrollment‘ flow.
  • Pass the required parameters to the ‘Child – Complete Enrollment‘ by reading parameters of ‘Parent – Enrollment Process‘.

Reason and Fix for ‘NestedWorkflowDoesNotContainResponseAction’ error:

  • If you open the ‘Flow Checker’ of the ‘Parent – Enrollment Process‘ you will notice “Update the child flow for action ‘Run_a_Child_Flow’ to end with a response action.” error.
  • The reason for the error is, Child flow must have one of the 2 following actions.
    • Respond to a Power App or flow (under the Power Apps connector).
    •  Response (on the premium HTTP request/response connector).
  • Save the ‘Child – Complete Enrollment‘ flow and ‘NestedWorkflowDoesNotContainResponseAction’ error should be fixed.
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: