Uipath recursive

Is this what you need?