Webhook and MongoDB: GitHub Actions Failure Log Template

Capture every failed GitHub Actions run in a MongoDB collection so your team has a searchable history of CI breakages, no log-digging required.

What It Builds

A Webhook Trigger receives workflow_run events that GitHub Actions posts to Spojit, verified with the GitHub signing scheme so only genuine GitHub deliveries run. A Condition node checks whether the run failed, and a MongoDB Connector node in Direct mode inserts the failure with its repo, branch, job, and run details.

The Prompt

Paste this into Miraxa and it builds the workflow, connecting the tools for you:

Build a workflow triggered by a GitHub Actions webhook, verified with the GitHub signing scheme, that receives workflow_run events. When the conclusion is "failure", insert a document into the MongoDB ci_failures collection with the repository name, branch, workflow name, run number, the triggering commit, and a link to the failed run.

Connectors Used

  • Webhook Trigger - receives GitHub Actions workflow_run events, validated with the GitHub HMAC signing scheme.
  • MongoDB - inserts each failed run into your chosen collection in Direct mode (no AI cost).

Customize It

Change the collection name (ci_failures), or add fields like the actor or job duration. Swap the "failure" check for "cancelled" or "timed_out" to track other outcomes, and adjust which repos send events from each repository's webhook settings.

Tips

  • Set the webhook secret in both GitHub and the Spojit Webhook Trigger so signatures match.
  • GitHub fires workflow_run on both start and completion: keep the Condition so only completed, failed runs are logged.
  • Index the repository and branch fields in MongoDB for fast filtering as the log grows.

Related

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.