
Prerequisites
- Admin access in Corgea
- Permission to create workflows in your Slack workspace
Setting Up Slack Workflow Builder
Use Slack Workflow Builder so you can map Corgea top-level payload fields into a channel message.1
Create a Workflow
- In Slack, open your workspace menu
- Go to Tools → Workflow Builder
- Click Create
- Choose Webhook as the trigger
- Name the workflow and continue
2
Configure Workflow Steps
- Copy the Workflow Builder webhook URL (
hooks.slack.com/triggers/...) - On the Webhook trigger step, add variables whose names match Corgea’s top-level keys (Slack does not auto-discover payload fields). Add at least:
message,pull_request_id,scan_url,true_positive_count,scan_id,event_type,project_name,status,branch,company - Add a Send a message step (required — Corgea does not post to Slack by itself)
- Use Insert a variable to insert those webhook variables into the message (typed
{message}text will not work)
scan.completed body Corgea sends to Workflow Builder (nested project, summary, and scheduled_scan_ids are not included):scan.failed, the flat body also includes top-level error when present.Start with message for a ready-to-send summary, then add pull_request_id, scan_url, and true_positive_count for PR triage.Completed-scan message wording uses true-positive counts (not total issues):Scan completed for {project} (PR #N): X true-positive finding(s) [(Y with fixes)]. View: {scan_url}Y with fixes counts fixes only among those true-positive findings.- Finish and publish the workflow
3
Configure in Corgea
- Go to Integrations → Webhooks
- Create a new webhook
- Set Type to
Slack - Enter a name and paste the Workflow Builder URL
- Subscribe to
scan.completedand/orscan.failed(optionallyscan.started) - Under Scan Event Filters (optional):
- Only pull request / merge request scans — skip non-PR scans
- Only completed scans with true-positive findings — skip
scan.completedwhentrue_positive_countis 0 (scan.failedis unaffected)
- Click Create Webhook and save the one-time secret key
- Click Test to confirm delivery
Test Webhook expectations
When you click Test Webhook on a Slack Workflow Builder destination, Corgea sends a flat sample like:company matches live scan events. company_id is the same value for older Test consumers. Non-Slack destinations receive the same fields nested under data in the usual envelope.
Expect:
- HTTP 2xx from Slack (not 400
invalid_workflow_input) - A non-empty Slack message when you map the top-level
messagevariable - Variable names that match production scan events (so you can map PR # / scan link / TP count during Test)
Notification Content
For Slack Workflow Builder (Type = Slack + hooks.slack.com/triggers/...), map these top-level fields:
true_positive_count matches the scan UI security count: excludes status=false_positive, hold_reason=false_positive, and detected_by=code-quality. Nested fields such as summary, project, scheduled_scan_ids, scan_errors, created_at, and processed_at remain available under data for Zapier/Other (and in delivery history), but are not flattened for Slack Workflow Builder.
Compatibility notes
- Zapier / Other: still receive the nested envelope (
event_id,event_type,timestamp,data), includingdata.message,data.summary, and the new triage fields underdata. - Existing Slack Workflow Builder configs that mapped nested
data.*will not work — remap to top-level keys (message, notdata.message). - Delivery history in Corgea stores the nested envelope even when Slack receives a flat HTTP body.
- Non-scan events on a Slack WF webhook are not flattened; keep those on Zapier/Other or a Custom Body if you need usable Slack variables.
Incoming Webhooks vs Workflow Builder
- Recommended: Workflow Builder URLs (
hooks.slack.com/triggers/...) with a Send a message step. Corgea flattensscan.*andwebhook.testforType = Slack. - Incoming Webhooks (
hooks.slack.com/services/...): rejected on save unless you add a custom body whose rendered JSON has a top-level non-empty stringtextfield (Slack fallback text; optionalblocksare allowed alongside it).{"text": "{{message}}"}works only when the webhook is limited toscan.started/scan.completed/scan.failed/scheduled_scan.daily_report({{message}}is empty for other events). Without a valid body, deliveries fail and the webhook can auto-pause.
Managing Existing Slack Integrations
If you still have integrations on the deprecated Slack row, open View All to test or delete them:
Customization Options
With Workflow Builder, you can:- Route messages to different channels by severity or project
- Add reminders or follow-up steps
- Build conditional logic around scan results (for example, only notify when
true_positive_countis greater than 0) - Reuse the same payload variables across multiple actions
