Data Stream (IntegrationHub) Action Output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2022 09:11 AM
I am using Data Stream (IntegrationHub) Data Source to import JSON data from a 3rd party site. I would like to use the response body directly as the action output, instead of creating and parsing each child item since there are many child items and some have complex data such as Array.Object. Göran Lundqvist mentioned in this youtube: https://www.youtube.com/watch?v=-lmbcm6j6Ew and I followed his suggestion (@ 55min). In Script Parser Step, I have
(function parse(inputs, outputs) {
- Labels:
-
Flow Designer
-
IntegrationHub
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2022 01:42 AM
Shui,
If you haven't already, I recommend you take the
Integration Hub (https://nowlearning.servicenow.com/lxp?id=learning_path_prev&path_id=329ac7201bbafcd4a5e699b1b24bcbe...)
and
Flow Designer Essentials (https://nowlearning.servicenow.com/lxp?id=learning_path_prev&path_id=193b8e6c87acf450ed3b74c9cebb355...)
courses on Now Learning as these will assist you with issues such as this.
The script you have there will create a variable of type object as an output to the action step. If you have the action step output defined then you can simply create an action output variable and drag the data pill for the step output to the action output.
You will need to be aware that both of your variables will be of type object.
Hope this helps,
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2022 11:09 AM
Thank you, Richard for your suggestion. Data stream (IntegrationHub) is a little different. I there is no data pill to drag for the action output.
Here is the Script Parser step.
Here is the Outputs step. When I ran text, the Output item is empty. I was able to get the result if I parse and map each child items.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2022 09:18 PM
Hi @Shui ,
Is the issue Resolved. I am looking for same approach.Need to Pass enitre responsebody to the Output object.
Regards,
VK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2025 02:36 PM
Did you find a solution?
I too am using a Data Stream, and parsing the inputs.sourceItem to the outputs.targetObject
(function parse(inputs, outputs) {
var item = JSON.parse(inputs.sourceItem);
outputs.targetObject=item;
})(inputs, outputs);
But only the top level values are populated;
Any help would be appreciated.
Regards Dan.
