Ticket Created Trigger icon

Ticket Created Trigger

Triggers when a new ticket is created in EnlightenedMSP

Overview

This node acts as a trigger that listens for new ticket creation events on a NATS messaging system within a specified namespace. It is designed to integrate with the EnlightenedMSP platform, specifically triggering when a new ticket is created. This node is useful in automation workflows where actions need to be initiated immediately after a ticket is generated, such as notifying support teams, updating dashboards, or starting incident response processes.

Practical examples include:

  • Automatically sending an email notification when a new support ticket is created.
  • Logging ticket creation events into an external system for analytics.
  • Triggering downstream workflow steps like assigning tickets or escalating priority based on ticket details.

Properties

Name Meaning
Namespace The namespace for the NATS event stream (e.g., "production", "staging"). Determines which environment's ticket events to listen to.
Queue Group Optional queue group name used for load balancing message consumption among multiple subscribers. If set, messages are distributed across subscribers in this group.

Output

The node outputs JSON data representing the newly created ticket event received from the NATS server. The output structure corresponds directly to the parsed JSON payload of the NATS message and is returned as an array containing one object per event.

If the incoming message cannot be parsed as JSON, an error is logged but not emitted.

No binary data output is produced by this node.

Dependencies

  • Requires connection to a NATS messaging server configured with credentials including server address, username, password, and token.
  • Uses the nats library to connect and subscribe to the event stream.
  • Requires an API key credential or authentication token for connecting securely to the NATS server.
  • The node expects the NATS topic format to be <namespace>.core.ticket.created.

Troubleshooting

  • Connection issues: Ensure the NATS server credentials are correct and the server is reachable from the n8n instance.
  • Message parsing errors: If the node logs errors about processing NATS messages, verify that the messages published to the topic are valid JSON strings.
  • No events triggered: Confirm that the namespace is correctly set and that ticket creation events are being published to the expected topic.
  • Queue group misconfiguration: Using a queue group incorrectly can cause messages to be load balanced unexpectedly; ensure all intended subscribers use the same queue group if load balancing is desired.

Links and References

Discussion