Help with 'schedule API workflow on a list'

Hi bubble collective,

I’ve been trying to figure this out for the past few days and keep getting either no data or too much data in one field…

let me explain…

I have an API from the UK Environment agency that produces a list of all the flood alerts in England. This is an open API and can be found here…

http://environment.data.gov.uk/flood-monitoring/id/floods

I have also setup the API is both an action and data and tried both…

I have also created a set of data types as per below…

Simple enough so far…

I’m then trying to have a backend workflow that checks the API and downloads all the rows to the data type as per above… right now I have a button on a page to kick it off, but ultimately this will be a recurring event.

So I can get the data to download (I think) with the workflow action in the screenshot above.

I then try to do the mysterious ‘schedule API workflow on a list’, and I’m very confused as to how to configure that block to go through each line in the API query and create a line in the ‘table’

I’ve tried various options from the type of things, the list to run on and the API workflow (I’ll show that below). when I try to extract the data I’m interested in from the fields (FloodAreaID etc). I keep getting the entire list in every row.

these are my parameters in the block to create the actual rows.

and this is the workflow I want to iterate through to create each of the lines.

so I think my problems are all to do with the configuration of the ‘Schedule API Workflow populate-flood-alerts on a list’ workflow block, but for the life of me I cannot figure it out. it seems like when I configure it to run on each items floodID, when I then try to get the data, I get all the data in all the fields.

any help or guidance or pointers to a decent example would be great, as I’ve been poking at this for 2-3 days now and It’s beaten me and I can’t find a simple example to follow ( the video guide was no use).

thanks in advance

Hey there,

Yep change the type of thing to be the result of the API call, it will say like environmental etc etc.

Then the source will be result of step one, this gives you a list of json objects.

Then for each of the fields it would be this environmental’s field name, for each one.

If you get stuck send me a DM and we can run through it on a screen share

Hi Oliver,

that worked, thanks so much for your guidance - it’s not exactly clear on how that works sometimes (to me anyway)…

While I’m at it on this on a list…

I have a similar problem with a CSV that’s been uploaded and I’ve fudged the way for it to work

and given your guidance I think I’ve also de fudged it…

thanks so much for your guidance

1 Like