Sub-Workflow does not return an output to the main workflow despite not throwing errors and showing the output in the last node of the sub-workflow (still happening in v2.0.3
@n8n-by-qasim this is not true as there is no such node called “Return data”.
@tasky_eduardo It seems like you have a logical issue in your sub workflow. It will always return data if the siteId did not exist in your db, but in cases where it does, the “If row does not exist” will exexute last. This is because n8n will execute each connected node when split from a single node one after another, meaning in this case the top row of nodes fired, completed with data, but then the second row was fired in this sequence:
This is what is causing the blank response. See below workflow for fixing this issue:
Rather try and get the data using the Get operation from the data table and then using an IF node to check if it exists or not. This way the sub workflow will not try and fire all paths even if it shouldnt.
Remember to set the Get node to always output data so that it continues to the next step if no data was found in the data table.