Skip to main content
Nintex Community Menu Bar

Hi 

 

I’ve created a workflow to load a data set that I’m accessing from an external API into a Nintex Table.

The API is too cumbersome and complex to do otherwise than simply create a “local copy” of the data so it can be used in my Nintex forms etc..

It’s all working fine but I’m having issues with the number of actions per workflow instance.

The API is returning me data in Json, so I”m using Query Json action. 

The problem is that I have to use one Query Json Action for each single field of data being returned, and even though I’m only loading a bit more than 200 rows it’s still blowing up because there are a lot of fields to retrieve. 

Right now all I can do is loop through the data array, load each field one by one in variables, and then create the row in the table using those variable. 

 

I’ve seen that I could leverage Query Json to retrieve multiple fields at the same time and load them in a collection, but then how to I retrieve each individual field from the collection without adding an extra step or loop ? 

Ideally I’d like to be able to insert a collection at a certain index into my create table row action:

tableprop1 = myFieldCollection[0], 

tableprop2 = myFieldCollection[1], 

etc…

and myFieldCollection is a collection of properties loaded via Query Json. This way I would save lots of actions for each record saving me from reaching the 10k actions limit too quickly. 

 

Any ideas or other suggestions ? 

Hi ​@etienneg,

Are you able to provide an example of the structure of the JSON that is returned from the API?

The reason I ask is that the Loop for Each action can handle some objects.
This means that for each loop, all you would need is one create row action, as the loop for each action extracts the data for the row for you, which means you don't need to query the JSON.


Hi ​@etienneg,

Are you able to provide an example of the structure of the JSON that is returned from the API?

The reason I ask is that the Loop for Each action can handle some objects.
This means that for each loop, all you would need is one create row action, as the loop for each action extracts the data for the row for you, which means you don't need to query the JSON.

Thanks,

Let’s say it looks like the below (it’s more complicated than that but I’m curious about the solution and maybe I can make it work, if I can reduce the number of action by just a few for each record it’ll already be a great improvement) : 

[

    {

      "phoneNumber": "0000",

      "email": "email@sample.com",

      "firstName": "firstName",

      "displayName": "displayName",

      "lastName": "lastName"

      },

    {

      "phoneNumber": "0000",

      "email": "email@sample.com",

      "firstName": "firstName",

      "displayName": "displayName",

      "lastName": "lastName"

      }

//etc...

]


Thanks ​@etienneg,

Okay, so I have investigated further. It looks like when you call a web service action, it returns a text variable. You really can't do much with it apart from using Query JSON actions like you have been doing.

In my testing, I created an Xtension that connects to my API and returns an object or collection. This can then be easily fed into the Loop for each action, which only requires a create row action to add a row for each object. 

This may sound scary, but if you feed the API endpoint to the AI Xtension generator and ask it to output an object, it will do most of the heavy lifting for you. In my case, I did not need to make any changes to the generated Xtension.
Here are the instructions on how to use the AI Xtension generator.
https://help.nintex.com/en-US/xtensions/04_Reference/REF_GenerateXtension.htm?tocpath=Add%20a%20custom%20connector%20to%20Nintex%20Automation%20Cloud%7C_____1


Thanks ​@SimonMuntz  that’s ok I think it’ll be fine for the time being.