Otrs icon

Otrs

OTRS Data Platform

Actions2

Overview

The Create Ticket operation for the Ticket resource in this n8n node allows users to create new tickets in an OTRS (Open-source Ticket Request System) platform. This is useful for automating ticket creation from various sources, such as contact forms, monitoring alerts, or customer support requests. For example, you could use this node to automatically generate a support ticket when a user submits a form on your website or when a system monitoring tool detects an issue.

Properties

Name Type Meaning
Title String The title of the ticket.
Customer User String The identifier (usually email or username) of the customer creating the ticket.
Subject String The subject line of the ticket's initial message.
Body String The main content or description of the ticket.
Additional Fields Collection Optional fields to further specify ticket details. See below for options.

Additional Fields Options:

  • Customer ID (Number): Numeric ID of the customer.
  • Queue ID (Number): Numeric ID of the queue to assign the ticket to.
  • Queue (String): Name of the queue.
  • State ID (Number): Numeric ID representing the ticket state.
  • State (String): Name of the ticket state.
  • Priority ID (Number): Numeric priority level.
  • Priority (String): Priority name.
  • Lock ID (Number): Lock status ID.
  • Lock (String): Lock status name.
  • Ticket Type ID (Number): Numeric type ID.
  • Ticket Type (String): Name of the ticket type.
  • Service ID (Number): Service ID related to the ticket.
  • Service (String): Service name.
  • SLAID (Number): SLA ID.
  • SLA (String): SLA name.
  • Owner ID (Number): Owner's user ID.
  • Owner (String): Owner's name.
  • Responsible ID (Number): Responsible user's ID.
  • Responsible (String): Responsible user's name.
  • Is Visible For Customer (Boolean): Whether the article is visible to the customer.
  • Sender Type ID (Number): Sender type ID.
  • Sender Type (String): Sender type name.
  • Auto Response Type (String): Auto-response type.
  • From (String): "From" field value for the article.
  • History Type (String): History type for the article.
  • History Comment (String): Comment for the history entry.
  • Time Unit (Number): Time unit for the article.
  • No Agent Notify (Number): Suppress agent notifications if set.

Output

The output is a JSON object containing the response from the OTRS API after creating the ticket. The structure will typically include:

{
  "TicketNumber": "202406120001",
  "TicketID": 12345,
  "ArticleID": 67890,
  // ...other fields returned by OTRS API
}

If an error occurs and "Continue On Fail" is enabled, the output will contain an error field with the error message:

{
  "error": "Error message here"
}

Dependencies

  • External Service: Requires access to an OTRS instance with API enabled.
  • Credentials: Needs an n8n credential named otrsAuthApi configured with appropriate API access.
  • n8n Configuration: No special environment variables required beyond standard credential setup.

Troubleshooting

  • Common Issues:

    • Missing Required Fields: If any required property (e.g., Title, Customer User, Subject, Body) is missing, the node will throw an error.
    • Invalid Credentials: If the OTRS credentials are incorrect or lack permissions, authentication errors will occur.
    • Unknown Operation/Resource: If an unsupported operation or resource is specified, the node will throw an error like The operation "X" is not known!.
  • Error Messages:

    • "The operation \"create\" is not known!": Check that you have selected a valid operation for the Ticket resource.
    • "The resource \"ticket\" is not known!": Ensure the resource is set to "ticket".
    • API errors from OTRS (e.g., permission denied, invalid data) will be passed through in the error field if "Continue On Fail" is enabled.

Links and References

Discussion