The CreatorCon Call for Content is officially open! Get started here.

Subflow Error retrieving outputs

NikethK
Tera Contributor

Has anyone encountered an issue where Subflow A calls Subflow B, but an error occurs when retrieving the outputs?

 

In my case, Subflow A triggers Subflow B, which contains a custom API action to generate a link. The execution in Subflow B runs successfully and produces the expected output. However, when Subflow A attempts to retrieve these outputs, it returns an error.

1 ACCEPTED SOLUTION

G Ponsekar
Giga Guru

Hi @NikethK ,

 

The error typically happens due to a mismatch in data types or structure between what Subflow B defines as its output and how Subflow A attempts to consume it. 
Here are the most likely causes for this behavior and steps to resolve it.
 
1. Data pill structure and complex objects
The most frequent cause of this error is a mismatch in how complex data is defined and handled. If your custom API action generates a complex JSON object (for example, with nested values), and the Subflow output is defined as a simple string, the data will be corrupted. 
Solution:
  • Create a custom object template: For complex outputs, define a custom Complex Object in the Flow Designer. This provides a structured schema for the data.
  • Update the custom API action: Modify the action to use this complex object template for its output.
  • Update Subflow B outputs: Make sure the output in Subflow B is also defined as the same complex object.
  • Update Subflow A: When you try to access the output in Subflow A, the data pill will now have a structured path (Subflow B -> Output -> my_nested_field), making it easy to reference correctly. 
 
2. Output assignment in Subflow B
There is a specific Flow Designer logic block for assigning output variables. If you use a generic Set Flow Variable action instead of the dedicated one, the output may not be passed to the calling flow correctly. 
Solution:
  • Use the correct flow logic: Ensure that at the end of Subflow B, you are using the Assign Subflow Outputs flow logic.
  • Check the output value: Verify that the data pill for the custom API action's output is correctly mapped to the Subflow B output variable within the Assign Subflow Outputs action.
 
3. Asynchronous execution and timing
In some cases, Flow Designer might attempt to retrieve the output before Subflow B has fully finished processing it, especially with long-running custom actions. This could leave the output variable empty. 
Solution:
  • Verify successful completion: While your logs indicate Subflow B succeeded, it's worth double-checking that the action completing the output runs to the very end before the subflow terminates.
  • Add a delay (for diagnostics only): As a temporary troubleshooting step, you can add a Wait for a duration of time action in Subflow B just before the Assign Subflow Outputs step. This is a crude method but can help diagnose if a timing issue is the problem

 

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!

 

Thanks, GP

 

View solution in original post

5 REPLIES 5

Hi @NikethK ,

 

The error occurs not because of the type of the final output, but because of the way Flow Designer handles the data pill reference throughout the execution chain. Even if you extract a simple string at the end of Subflow B, the system might have already encountered and processed the complex object from the custom action, creating a data pill reference that is not compatible with a simple string return.

 

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!

 

Thanks, GP