Help needed to pick one node's output after error path and continue workflow

I’m trying to handle errors in a workflow where I’m scraping a website with a GET request. If it fails, I want to switch to FireCrawl. However, I’m struggling to continue the workflow smoothly. When I connect both outputs to the next nodes, it errors because one branch doesn’t execute. I’ve tried forcing both to output data, but the output name changes depending on whether it’s an error or success, which breaks the workflow. The same issue happens when using a Merge node.

Is there a simple solution I’m overlooking?

@Russat So the solution is to add a filter after the Markdown node that checks if the output is not equal to the error message ‘Cannot convert undefined or null to object’. This way, when the Markdown node fails, its output gets blocked, and the Firecrawl node’s output proceeds to the Edit Fields node. If the Markdown node succeeds, its output goes through to the Edit Fields node. Either way, the data gets thru. This setup is cool because it uses Firecrawl as a fallback, saving time and requests by only kicking in when the normal GET request fails.

Hope this helps

4 Likes

Thanks I figured it out

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.