NinjaOne icon

NinjaOne

Consume NinjaOne API

Actions158

Document Templates → Get Document Template

AI-generated

Overview

This node interacts with the NinjaOne API to retrieve detailed information about a specific Document Template. It is useful in scenarios where you need to fetch and use document templates stored in NinjaOne, for example, to automate report generation or integrate template data into other workflows.

A practical example: You want to get a particular document template by its ID and optionally include the allowed technician roles associated with it. This can be used to dynamically populate documents or verify permissions before further processing.

Properties

Name Meaning
Document Template Id The unique numeric identifier of the document template to retrieve (required).
Include Technician Roles Boolean flag indicating whether to include the allowed technician roles in the response.

Output

The node outputs a JSON object representing the retrieved document template details from NinjaOne. This includes all standard fields of the document template as returned by the API. If the "Include Technician Roles" option is enabled, the output will also contain information about the allowed technician roles related to that template.

No binary data output is produced by this operation.

Dependencies

  • Requires an active NinjaOne API OAuth2 credential configured in n8n.
  • The node uses NinjaOne's REST API endpoints to fetch document template data.
  • Network connectivity to NinjaOne API service is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing Document Template Id will cause the API call to fail.
    • Lack of proper API credentials or expired tokens will result in authentication errors.
    • Enabling "Include Technician Roles" without sufficient permissions may lead to incomplete data or errors.
  • Error messages:

    • "No binary data exists on item!" or similar will not occur here since this operation does not handle binary data.
    • API errors from NinjaOne (e.g., 404 Not Found if the template ID does not exist) will be surfaced as error messages.
  • Resolutions:

    • Verify the Document Template Id is correct and exists in NinjaOne.
    • Ensure the NinjaOne API credentials are valid and have required scopes.
    • Check user permissions if including technician roles.

Links and References

Discussion