Receive JSON response from API, run transform map when API called and populate table

SushmaUday
Tera Contributor

Hello All,

 

We have a requirement as bellow

1. We will be receiving data (couple of fields) in JSON format

2. Receive response from Rest API

3. When ever we receive data populate table in Servicenow.

Implementation plan :

1. Create an API to receive the data and get the field out of JSON

2. Then create import set and update import set 

3. which should trigger transform map and update target table

 

Problem while implementation:

How should I create an import set either with file or Data source?

Can I use data source of type Rest(Integration hub) to implement this?

How can we update the import set with data we receive it API?

How to trigger transform map once update import set?

 

Can someone help me with any other implementation plan ?

Thanks in Advance 🙂

@

2 REPLIES 2

Taksh
ServiceNow Employee
ServiceNow Employee

Have you considered flow designer to implement your use case? High level steps are:
1) Action: Create an action to make a REST call to API. Response received will be an output of action.
2) Flow/Subflow: Create a new flow/subflow to consume the action created in step 1. Utilise for each loop to iterate over action output.

3) Data insertion in table: Utilise "create or update" action to insert records into table.

I have a similar use case as the OP.  While your suggestion makes sense if there was a way to use the transform map on the API output (in my case it will be a JSON structured object) I would be able to use the transform map to associate data to table and record both existing and new.  using flow designer would work but the over head and maintenance should anything change in the output API would be much more time consuming then being able to utilize the transform map.