Sorting and Posting Incident Details to Slack
Configured with Date Time, Schedule Trigger, Service Now, Slack, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- Transform
- Integration
- Routing
- Messaging
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| When clicking ‘Test workflow’ | Trigger | Manual Trigger | See node parameters |
| Run Every 5 Minutes | Trigger | Schedule Trigger | See node parameters |
| Get 5 Minute Ago Timestamp | Transform | Date Time | subtractFromDate |
| Get Incidents from ServiceNow | Integration | Service Now | incident / getAll |
| Check if New Incidents | Routing | If | See node parameters |
| Post Error Message if Error with ServiceNow | Messaging | Slack | See node parameters |
| Sort Incidents in Ascending Order | Transform | Sort | See node parameters |
| Post Incident Details to Slack Channel | Messaging | Slack | See node parameters |
| No Incidents, Do Nothing | Routing | No Op | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
serviceNowBasicApislackApi
Workflow notes
Sorting and Posting Incident Details to Slack
Sorting and Posting Incident Details to Slack
This section begins with the Sort Incidents in Ascending Order node, which organizes the retrieved ServiceNow incidents by their incident number in ascending order. This ensures that incidents are processed and displayed in a logical sequence. The sorted incidents are then passed to the Post Incident Details to Slack Channel node, which formats and sends a detailed message to a designated Slack channel. The message includes key information such as the incident ID, description, severity, caller, priority, state, category, and the date the incident was opened. A "View Incident" button is also provided, linking directly to the ServiceNow record for quick access. This section ensures clear, organized communication of incident details, enabling efficient team collaboration and resolution.
Fetching and Checking New Incidents
Fetching and Checking New Incidents
This section begins with the Get 5 Minute Ago Timestamp node, which calculates a timestamp exactly 5 minutes prior to the current time. This timestamp is used as a reference point for querying incidents created within the last 5 minutes. The Get Incidents from ServiceNow node then fetches all incidents created after the calculated timestamp from the ServiceNow system, ensuring only the most recent incidents are retrieved. Finally, the Check if New Incidents node evaluates whether any incidents were returned by checking if the sys_id field exists in the response. This logic helps determine the next steps in the workflow, ensuring actions are taken only when new incidents are detected.
Error Notification to Slack
Error Notification to Slack
This section handles error reporting using the Post Error Message if Error with ServiceNow node. If the workflow encounters any issues connecting to ServiceNow, this node sends a predefined error message to a specified Slack channel. Usually this is triggered by expired credentials. The message alerts the team to investigate the issue in n8n, ensuring prompt attention and troubleshooting. By proactively notifying the team of connection errors, this section helps maintain the reliability of the workflow and minimizes disruptions in incident monitoring and reporting.
Run Every 5 Minutes
Run Every 5 Minutes
The Schedule Trigger node is configured to automatically execute the workflow every 5 minutes. This setup ensures consistent and timely monitoring for new incidents in ServiceNow without requiring manual input. The selected interval strikes a balance between responsiveness and efficient resource usage, making it ideal for real-time incident management workflows.
No New Incidents Found, Do Nothing
No New Incidents Found, Do Nothing
If a ServiceNow system ID is not found in the ServiceNow node output, it will route to this node which effectively ends the process without doing anything.
Sorting and Posting Incident Details to Slack
Sorting and Posting Incident Details to Slack
Purpose and structure
This folder contains the Sorting and Posting Incident Details to Slack workflow. Its executable nodes use dateTime, if, manualTrigger, noOp, scheduleTrigger, serviceNow, slack, sort. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
When clicking ‘Test workflow’, Run Every 5 Minutes
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Datetime/0682_Datetime_Schedule_Create_Scheduled.json MIT; preserve source notices.