JSON from custom API to a list view?

I’m new to DronaHQ but have been using low-code and no-code tools for some time and have over a decade of experience in real programming so I’m aware of the concepts, but I’m having a difficult time getting the response from a custom API (JSON format) into a list view. I can get the response returned in the connection editor and can even get the values of an object to appear in a toast element from an action workflow. No matter what I do I can’t get the objects to pass through to the list view though.

Am I missing something basic here? Is it not possible to directly feed the list with the response from the webhook? Am I supposed to be putting the response into a temporary sheet? I feel that would be silly since I can manipulate the data after the response while still in the client-side action workflow.

Hi @dyelton

Yes you can bind the api response directly to tablegrid control.

I will list down the steps involved below -

  1. Register you custom api (You would have already registered this looking at your response)
  2. Add your api in the connectors section. (You are adding it from actionflow i presume as you are showing toast. instead you should add it from Connectors option on the left sidebar)
  3. once, the api is added in connectors, you can bind this api in Tablegrid control > Properties > Data > Api > Select api . Select multiple keys which you want to show.
    The keys you select above should be of same length, For eg - if JSON response is below, you can add data.name and data.Age keys but cannot add offset key as others are of length 2 and offset is a single value.
    image

I have created a quick video of the same - here

For a sample usage of Data binding from Api - refer this article

Hope this helps!

Thanks @fenil.jain

Using the option from the left worked but I think my bigger problem was me trying to use a custom column from the users sheet table as a API request variable. It doesn’t appear that sheet data is accessible directly for the connector to use? What is the proper way of going about this?

I’m essentially adding additional columns to the user table for things like site, company, etc.

@dyelton

You will have to register the custom column as a dynamic property when you are configuring/registering your api.

once you do that, that request field will start appearing as an additional field when you are adding the connector from left menu. Here you can get this Custom value from users Sheet using LOOKuP formula to any hidden control and give that control’s reference over here in Connector. This way you will be able to use dynamic values in your api requests.

Have a look at this section for reference on dynamic parameters

Hope this Helps!

I’m not sure this is what you mean so I think I’m missing something as this isn’t working?

@dyelton

Connectors Side bar doesn’t support Formula, only Keywords, variables and controls (However, Workflow accepts formula), so it will be better if you add this formula to another control like text control (in case of single vaklue) or checkbox control (in case of multiple values) and add this control in connectors sidebar.

Also, LOOKUP of single row will return an array so i hope your api expects the same. If thats not the case then you can add filter in your lookup function and add it to Text control. Text control implicitly converts array in single text so if its an array of single item then it will return single item.

For more info on LOOKUP function, refer this

Hope this helps!

I just figured it out (before reading your response) so all is good now. Loving the platform, just a bit different from the other low-code alternatives that I’ve been involved with.