Automated Test Alerting for Slack
Learn how to build an automated workflow using n8n to monitor running tests for specific health metrics and receive instant alerts in Slack.
Overview:
This guide walks you through creating a daily automation that checks running tests for traffic or data issues (low visitors, SRM failures, large conversion drops, minimum orders per variant) and posts a Slack alert when a test fails health thresholds.

Softwares Used
To build this automated reporting pipeline, you will need the following tools:
n8n: The primary workflow automation platform used to connect APIs and schedule tasks.
Slack: The final destination where the AI-generated health checks and reports will be posted.
How to Create Your Automated Test Alerts
Step 1: Get Your Intelligems API Keys
[How to get Intelligems API Key]
Step 2: Create the Workflow in n8n
Node 1: Schedule Trigger
Click the "+" button to add a node
Search for "Schedule Trigger"
Configure it:
Trigger Interval: "Hours"
Hours Between Triggers: 8 (runs 3x daily: morning, afternoon, evening)
Or set to 12 for 2x daily

Node 2: Create Organization List
Add "Code" node
Select "Code in JavaScript"
Select "Run Once for All Items"
Paste this code. Update it with a display name for your client & their API key:

Node 3: Get All Running Tests
Click "+" after the Schedule node
Search for "HTTP Request"
Configure:
Method: GET
URL:
https://api.intelligems.io/v25-10-beta/experiences-listAuthentication: None
Enable Send Headers
Name:
intelligems-access-tokenValue:
{{ $json.apiKey }}
Click "Execute step" to verify it works

Node 4: Filter Tests by Status = "started"
Add "Code" node
Select "Code in JavaScript"
Select "Run Once for All Items"
Update the below code so that
InsertOrgIdmaps to match the Intelligems organization IDs of your clients (you can find these in Intelligems under Settings > General > Organization Settings), thenamevalue is display name for your clients, and theapiKeyvalue is the Intelligems API Key for those clients. Then paste this code into the Code section in n8n.

Node 5: Get Test Analytics Data (Loop)
Add "HTTP Request" node
Configure:
Method: GET
URL:
https://api.intelligems.io/v25-10-beta/analytics/resource/{{ $json.experienceId }}Authentication: None
Enable Send Headers
Name:
intelligems-access-tokenValue:
{{ $json.apiKey }}
Click "Execute step" to verify it works

Node 6: Check if below threshold
Add "Code" node
Select "Code in JavaScript"
Select "Run Once for All Items"
Update the below code so that the
minTotalVisitors,minOrdersPerVariant,srmPValueThreshold, andconversionDropThresholdvalues match your threshold requirements. Then paste this code into the Code section in n8n.

Node 7: If hasIssues = True
Add an "If" node
Set the condition as
{{ $json.hasIssues }}is euqal totrue

Node 8: Send to Slack
For the "true" response only, add a "Slack" node where the action is "Send a message"

Authentication:
Click "Create New Credential"
Click "Connect my account" and follow the prompts
Channel/Use:
Under "Send Message To" configure where you want this slack message to appear
Message:
in "Message Text" input:

Step 3: Activate the Workflow
Once everything works, click "publish" at the top to make this workflow go live!
Your workflow will now run 3 times a day and notify you if an active test does not meet your threshold.
Bonus: Automatically Pause Failing Tests
Follow this guide to also automatically pause tests with issues.
Last updated
Was this helpful?