Using CSV data to trigger a flow and then record the results

Hello - I am struggling to get a csv variables ( or a cvs in runner ) to trigger a flow and then record the logs or output data from this. I want it to iterate through the csv updating the flow each time and logging the results - either using newman or manually downloading it from the send and save section. Is this possible? I can not find any up to date support.

Hi @eddi33

Welcome to the forums!

Can you expand on what you’re trying to do?

Flows can be triggered if they are deployed to the cloud which can then be called using the webhook URL. Otherwise they can be run locally by manually pressing the run button.

We don’t have local file support in Flows, but if your csv file is in Google Sheets (or similar) and accessible via API then you can use it in flows.

1 Like

Hi Daniel,

Thank you very much for getting back to me. I am trying to use the csv to provide 6 variables ( per row ) which then through the flow ends up at the output with 3 variables ( FAIL, Correct and Corrected through Flow. ) I then need this response data put back into the csv ( which i will now upload to google sheets and use API to call and change start block to “Any”? ). Is this possible too?

It says the webhook is deprecated - presumably this approach will change soon?

Many thanks,

Eddie

Hi Eddie,

If your CSV is in Google Sheets, then you can loop through every row in the flow and then update the Sheet using another API call at the end with the three variables you mentioned.

webhooks will be replaced by a more powerful solution and there will be an easy upgrade path.

Let me know if there’s anything else I can help with or if you run into any issues.

If you need an example to help get you started, you can view the flows catalog and search for “Add subscribers to Mailchimp from Google Sheets rows”.

Hi Daniel,

Thank you - that was very helpful. I have used google sheets for my csv and API to initiate the flow. I have put a delay on the loop to slow down the iterations and this appears to be working fine. The issue I am now facing is the PUT query to output the results per row back into my google sheet and a way of resetting the paths after each iteration ( currently my results out put is multiple answers - when it should only have one ).

Do you know of any examples for this? I am currently trying to use an evaluate block with no luck to reset the paths and the PUT query is also failing ( 400 bad request ).

many thanks

@eddi33

Do you have a screenshot or example of what your output looks like today and what you would like it to look like?

Hi @flows-daniel ,

I do indeed. The output block ( circled in yellow ) is what i was originally using with a scenario to test the Flow which was working.

I now have the GET query working - except the variables are not being reset. I am trying to use the evaluate block at the end of the flow ( after the PUT query ) to do this ( although not sure if best practice )?

Problem I have is the Fail path from the GET query ( 404 ) I THINK, is completing the path to the PUT query faster than the other paths and/or still triggering in the console when it should not. I am using the If block to try deal with this. I have tried adding a delay to this to allow other paths to ‘catch up’ but the output is still showing as a FAIL from the GET query even if it was a success and that path has reached the PUT query ( i think because it is still feeding the last results and the path is not being reset ). I have also tried using an evaluate block ( circled green ) before the PUT query which I linked the FAIL path into to return it in the CorrectHSCode field on the csv as well as collecting all the info before the PUT was triggered - but also no joy.

Hope that makes some sense.

Many thanks,

Eddi33




@eddi33

It looks like there’s a couple things going on:

  1. You have TypeScript written but FQL selected in your evaluate blocks which is causing them to not work properly
  2. Resetting the variables at the end in the evaluate block doesn’t work because the code you write is output by the evaluate block but isn’t actually used. Variables can’t be referenced between blocks without connecting them.

I’d be happy to jump on a debugging call and get you unblocked in your workflow because what you’re trying to do is achievable.

Feel free to book some time here at your convenience.