Send Email When API fails in Workflow

Hi! I'm looking to send an email when an API fails.

I set a branch after my API call for when the metadata status does not return 200 and send an email. However, it looks like when the API call fails, the workflow skips all future queries and the status is never sent to the branch. Any thoughts on how to pass the metadata status along for failure (or more broadly send an email when an API error happens)?

Welcome to the community

What you can do in workflows is set a query/block to be the "global error handler" so that you don't have to create branches for each failure - this is different to when there's "unintended" things that happen, such as the API not erroring but returning zero results, for example. You'd still handle those in your branch logic, but if there's an actual error then the global handler can recieve the data from that broken query and email/slack/raise a ticket or whatver you wish.

This might help in your case