Hi everyone,
Hopefully you can help, I’ve tried looking this up, and done the academy course - but I’m none the wiser.
Basically, I start with a spreadsheet with a URL in each row. These are aggregated, and then iterated into the rest of the automation (which essentially has some AI modules).
However, lets say one of these modules fails - I want the URL that caused the issue to be written to a spreadsheet, and the automation then carrys on using the ‘next’ URL in the iteration and continues the process.
This sounds like it should be easy, but I’ve hit a wall in my research.
Could anyone point me in the right direction? This would really help me out!
Hello!
Could you please share a screenshot of your scenario so that I can see where you could put the error handler?
More generally, assuming each URL is in a different bundle, if you want your scenario not to stop and carry-on to the next URL (bundle), you need to add the Ignore module in the error handler.
Then, before the Ignore, you can add a “Google Sheet/Add a row” module and store all relevant information (url, type of error, date/time, etc).
You should identify the module(s) that sometimes fail, because you will have to do the same for each since error handlers are module-specific.
This would look like this:
I hope it helps. Don’t hesitate to send more information about your scenario so that my answer is more precise.
Cheers
3 Likes
Hi Benjamin,
Really appreciate your help on this (my make experience has been great).
Essentially, I’d like an error handler at the http module, and also the first OpenAI module. These would probs do different error processes so maybe just focus on the first GTP module.
The process stars with a Google sheet search which pulls urls into the iteration and then passes them along the automation, along with a page scrape.
Occasionally, the token limited is exceeded in the first open ai module, so basically I want that URL written to a spreadheet (or probably an email which would be better).
I then want the automation to just pull the next URL in the iteration into the automation.
Does that make sense?
Here’s a screen shot of where I am currently. Which is working, aside from this error handling I mentioned.
Any advice would be brilliant, thanks in advance
1 Like
If you right-click on the http module, you have an option « add error handler ». Then select Ignore.
You can do the same on the ChatGPT module.
Once you have configured it you can add as many modules as you want before the 2 Ignore. From there you can select fields from the iterator (which contains the url I suppose).
If one of the 2 modules fail, the other bundles (so, URLs) will be processed.
One important note. In the http module you have to capture errors. Select « show advanced settings » and at the beginning of the module, select « Evaluate all states as error ».
May I ask why you use an aggregator followed by an iterator? It’s possible you don’t need them. Normally your Search Rows returns bundles with urls, so you can immediately process each individually.
Let me know if it’s clear
3 Likes
HI Benjamin,
Really appreciated. So I’ve done a test (writing the problem URL to a spreadsheet / using the 'ignore) and early indications is that it worked! I think my confusion is visually seeing an ‘ignore’ module ‘after’ the google sheet - but it all seems to work perfectly. I guess I can just add the same after the ‘HTTP’ module to capture URL’s that aren’t valid(?).
Whilst I put a spreadsheet in the error handler, I’m guessing I could just do that with an ‘email’ module so that someone recieves that there is an error - it would be exactly the same?
May I ask why you use an aggregator followed by an iterator? It’s possible you don’t need them. Normally your Search Rows returns bundles with urls, so you can immediately process each individually.
Can I just jump from the Google sheet straight to the iterator? I’d read (or seen online) someone saying you needed to pass an array from an aggregator into an iterator so it knows how to ‘split’ all the different rows that have been pulled in. Is this not correct in this instance?
Thanks again!
Hello!
I’m happy it finally works!
Yes you can do the same in the HTTP Module. And yes you can do what you want in the error handling path; so sending an email to warn someone is fine too.
For the aggregator and iterator, in fact, if your spreadsheet contains rows and if each row has the url you want to reach, you should already get « bundles ». Each bundle will contain a row data, including the url. And the rest of the scenario will automatically loop each bundle.
I don’t see the details but it looks like you group the bundles into one single array, and then you split this array back to bundles.
If you remove the aggregator and iterator, you’ll still be able to map the column that contains the urls from Google sheet, and it will loop for you.
Maybe give it a try, without saving, and if it fails or causes troubles, get out of the scenario without saving.
Kind regards,
Benjamin
2 Likes