How to parse JSON response to "Data Source" table ?

Arif6
Giga Contributor

I have used a REST Message to pull data in JSON format from third party tool Now I want this data in target table in tabular form..how can I do that? I think first I need to push this data to "Data Source" table & then user Transform map to push this data to target table, however, How do I make this JSON data format to "Data Source" table? & also run this API daily to keep pulling data from third party tool & update the target table on daily run Thanks!

6 REPLIES 6

Anil Lande
Kilo Patron

Hi,

You can create a import set table and add columns to store the information which you are get from 3rd party.

Once you get the JSON from 3rd part API call, parse JSON and insert records in to the import set table.

For Example check below link:

https://community.servicenow.com/community?id=community_question&sys_id=08648769dbd8dbc01dcaf3231f96...

 

Thanks,

Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Tony Chatfield1
Kilo Patron

Hi, I would suggest you look at using a scripted REST API, you post the data into an endpoint\import table and then follow the standard data import process\transform. to run dialy just set up a scheduled job to trigger your REST message/script.

https://docs.servicenow.com/bundle/quebec-application-development/page/integrate/custom-web-services/concept/c_CustomWebServices.html

https://www.youtube.com/watch?v=DyIuma1cZrg

Ankur Bawiskar
Tera Patron
Tera Patron

@Arif 

As mentioned by Anil you can use that approach

check this article for steps

Wanting to Import data using external REST service on a schedule using Import Set / Transform Map

Also check below links

Import Set API - multiple records

Inserting multiple rows with a single Import Set API call

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Thanks Ankur. I am trying to utilize these suggested answers in my requirement.