New Ticket Alerts to Teams
detail.loadingPreview
Alerts the Dispatch team via Microsoft Teams when new tickets are created in Connectwise.
About This Workflow
This workflow automatically monitors Connectwise for new service tickets that match specific criteria (status and board). It then filters out tickets that have already been processed and consolidates them by company and site before sending a formatted alert to a designated Microsoft Teams channel. It also logs processed ticket IDs in Redis to prevent duplicates.
Key Features
- Scheduled Monitoring: Triggers at regular intervals (every minute between 8 AM and 4 PM, Monday to Friday).
- New Ticket Retrieval: Fetches new tickets from Connectwise based on status and board filters.
- Duplicate Prevention: Uses Redis to store and check processed ticket IDs, preventing repeated alerts.
- Data Aggregation: Combines tickets belonging to the same company and site into a single message.
- Formatted Alerts: Sends rich HTML messages to Microsoft Teams, including ticket summaries and company details.
- Error Handling (Implicit): Standard n8n error handling mechanisms will apply.
How To Use
- Schedule Trigger: Configure the
Schedule Triggernode to define the frequency of ticket checks. The current setting*/1 8-16 * * 1-5runs the workflow every minute between 8 AM and 4 PM, Monday to Friday. - Get New Tickets: The
Get New Ticketsnode fetches tickets from Connectwise. The URL and query parameters should be reviewed and adjusted if your Connectwise setup or desired filters differ.clientId: Ensure this is correct for your Connectwise API integration.credentials: Configure yourHeader Auth accountfor authentication.
- Add Filterable Parameter: The
Add Filterable Parameternode preprocesses the fetched tickets. It ensures the ticketidis a string and adds aFilterOnThisfield, which is used for filtering. - Query Database: The
Query Databasenode checks Redis to see if the ticket ID has already been processed. It uses the ticketidfrom the previous node as the Redis key.credentials: Configure yourRedis-Dispatchcredentials.
- Filter Out Tickets that have already been sent: The
Filter Out Tickets that have already been sentnode acts as a merge node. It compares the incoming tickets (input1) with the tickets retrieved from Redis (input2) using fuzzy matching onFilterOnThisandTickets. ThejoinMode: 'keepNonMatches'ensures that only tickets not found in Redis are passed through. - Combine like Companies: The
Combine like Companiesnode (a Code node) aggregates tickets. It groups tickets bysiteNameandcompanyNameand combines their summaries into a single string with HTML line breaks (<br>). Ensure the paths tositeName,company,recordType,id, andsummaryin thejsCodeare accurate for your Connectwise data structure. - Log in Redis: The
Log in Redisnode stores the ID of each newly processed ticket in Redis using thesetoperation. This marks the ticket as having been sent.credentials: Configure yourRedis-Dispatchcredentials.
- Teams to Dispatch: The
Teams to Dispatchnode sends the aggregated ticket information to Microsoft Teams.chatId: Ensure this is the correct chat ID for your dispatch team's channel.message: The HTML message format can be customized.{{ $json.ticketType }},{{ $json.tickets }}, and{{ $json.companyName.name }}are placeholders for data from theCombine like Companiesnode.
Apps Used
Workflow JSON
{
"id": "bdacec91-f6de-42da-8ab0-e9243fb1bc45",
"name": "New Ticket Alerts to Teams",
"nodes": 27,
"category": "IT Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: bdacec91-f6de...
About the Author
N8N_Community_Pick
Curator
Hand-picked high quality workflows from the global community.
Statistics
Related Workflows
Discover more workflows you might like
Syncro Alert to OpsGenie
Automatically sync alerts from Syncro to OpsGenie for incident management.
Slack to ServiceNow Incident Search
Search ServiceNow for incidents based on priority and state directly from Slack.
PagerDuty Incident Management
Create, update, and retrieve incidents in PagerDuty.