- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago - last edited 5 hours ago
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi @NikethK ,
- 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.
- 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.
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
@NikethK Ensure the output variables in Subflow B are correctly defined as "Output" variables and have the appropriate data type,
verify custom API output, is it returning Object? then simply returns the value instead of JSON.stringify(),
use gs.info(), in your custom Api to verify the output in logs,
You can share your code here for further investigations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi @NikethK ,
- 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.
- 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.
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Thanks, your first suggestion worked.
After updating Subflow B to return the entire object rather than just the extracted string, and then iterating through that object in Subflow A to retrieve the string, the flow executed without any errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago - last edited 3 hours ago
Why does the data corrupt if i am able to extract the string from the nested object and then try to return only that string to my output which is also a string type?
The idea was that my action will return an object , Subflow B will iterate through the object to get the link but with this solution it would still fail if i wrap it in Subflow A which calls Subflow B to just get the link.