How to capture log errors into a table if error occurred during execution of workflow or Schedules
There's a few approaches I can think of here. You could consume the /jobs API endpoint, either in a different tool or in Data Studio itself, to capture failing job executions.
A simpler solution would be to use a Automation triggered by the Workflow Failed event, where the event data (error message, error time, workflow name etc) are passed as parameters into a second workflow that logs the event in a table.
The automation would look something like this:
And the workflow to log errors would take the parameters from the event, add them to a row, and then insert that row into the error log dataset, which is multi-batch:
The Workflow Error Log table in this case ends up looking like this, when a couple of workflow executions have failed: