I have ran a backend workflow triggered by an API call that save into the database more than 2000 thousand records. It takes a lot and I don’t want to wait for this process finish. Do you know if it is a way to trigger the process, leave it working on the background and return from the API a success response?
This is the workflow I have, it is quite simple. I have an public endpoint that calls the API connector plugin, that call returns a list of things and with that list I ran another backend workflow to save the response. Can I put something in the middle? Maybe add something between them. I don’t know.
To track its progress you may want to set it up as a recursive workflow instead of running a regular API workflow on a list. I have an article on how to do that here and another one on how to track the ongoing progress here.
In your case if you only want a simple message when it’s done, you may want to simply check for the number of records left in your list parameter. When it’s only 1 left, that means the process has nearly finished and you can send yourself an email or whatever you want to do to alert yourself.
Thanks @petter and @ankur1! I used a mix of both or at least that is what I think. Now I found another issue in the road. What I did is create a workflow that will received the following response object from the API connector plugin
Basically it is a list of an objects that I have defined on my database as “Skills”.
This workflow recursively will perform an action for each of the list’s elements.
As I said before, each element on the list is an skill, but really the response from the api it is not a list of skills, it is a list of strings/json so when I am not able to use these values as input values for the next workflow, because is expecting Skills not strings.
There is a way to parse the API connector response. Maybe add another step. Or maybe work with strings instead of skills. Thank you in advance guys.
I ran into the same challenge a couple of months back, but ended up going with another solution, so never got around to finding a way to parse the result from the API connector unfortunately.
Would love to hear if people have a suggestion on this one.