n8n/packages/@n8n/instance-ai/evaluations/data/workflows/notification-router.json

57 lines
3.0 KiB
JSON

{
"conversation": [
{
"role": "user",
"text": "I want a webhook that fans out incoming notifications to different places depending on how urgent they are."
},
{
"role": "assistant",
"text": "What does each incoming payload look like, and what are the urgency levels?"
},
{
"role": "user",
"text": "JSON with `level` (\"High\", \"Medium\" or \"Low\"), `title`, and `message`. Each notification should be forwarded with title + message intact."
},
{
"role": "assistant",
"text": "Where should each level go?"
},
{
"role": "user",
"text": "High → Microsoft Teams (team ID '9b4c3a2f-1d8e-4f5b-a6c7-8e9f0b1d2c3a', channel ID '19:a1b2c3d4e5f6@thread.tacv2'). Medium → Slack #notifications. Low → email to alerts@ourcompany.com via Gmail."
}
],
"messageBudget": 6,
"processExpectations": [
"Before building the workflow, the agent established the incoming payload shape and the urgency levels from the user — by asking, or because the user stated them in an answer — rather than assuming or inventing payload fields the user never described.",
"Before building the workflow, the agent asked where each urgency level should be routed."
],
"outcomeExpectations": [
"The final workflow branches on the notification `level` (e.g. a Switch node) and routes High to Microsoft Teams, Medium to Slack, and Low to Gmail, as specified in the follow-up."
],
"complexity": "medium",
"tags": ["build", "webhook", "switch", "microsoft-teams", "slack", "gmail", "routing"],
"triggerType": "webhook",
"datasets": ["mcp", "pr", "full"],
"executionScenarios": [
{
"name": "high-priority",
"description": "A high-priority notification is routed to Microsoft Teams",
"dataSetup": "The webhook receives { \"level\": \"High\", \"title\": \"Server Down\", \"message\": \"Production database is unreachable\" }. The Microsoft Teams node returns a success response.",
"successCriteria": "The workflow routes the high-priority notification to Microsoft Teams. The Teams message contains 'Server Down' and the database message. No other channels receive the message."
},
{
"name": "medium-priority",
"description": "A medium-priority notification is routed to Slack",
"dataSetup": "The webhook receives { \"level\": \"Medium\", \"title\": \"Deployment Complete\", \"message\": \"Version 2.5.0 deployed to staging\" }. The Slack node returns a success response.",
"successCriteria": "The workflow routes the medium-priority notification to Slack #notifications. The Slack message contains the deployment details."
},
{
"name": "low-priority",
"description": "A low-priority notification is routed to email",
"dataSetup": "The webhook receives { \"level\": \"Low\", \"title\": \"Weekly Report Ready\", \"message\": \"The weekly analytics report has been generated\" }. The Gmail node returns a success response.",
"successCriteria": "The workflow routes the low-priority notification to Gmail. The email is sent to alerts@ourcompany.com with the report notification."
}
]
}