Undrill Auth icon

Undrill Auth

Undrill Authentication node for protecting n8n workflows

Overview

This node, named "Undrill Auth," is designed to authenticate and validate a license for workflows in n8n using the Undrill service. Its primary function is to verify that the workflow has a valid license key associated with a given client ID. This validation helps protect workflows by ensuring only authorized users or clients can execute them.

Common scenarios where this node is beneficial include:

  • Ensuring compliance with licensing terms before running critical automation workflows.
  • Protecting proprietary or paid workflows from unauthorized use.
  • Integrating license validation as a prerequisite step in complex automation pipelines.

For example, before executing a workflow that processes sensitive data or triggers costly operations, this node can be used to confirm that the user holds a valid license, preventing unauthorized execution.

Properties

Name Meaning
Client ID Your Undrill client ID (string)

The node also has an internal "Operation" property with one option:

  • Validate License: Checks if the provided client ID and current workflow ID match a valid license key.

Output

The node outputs JSON data with the following structure on successful validation:

{
  "valid": true,
  "message": "License validated successfully",
  "clientId": "<provided client ID>",
  "workflowId": "<current workflow ID>"
}

If validation fails and the node is set to continue on failure, it outputs an error object:

{
  "error": "<error message>"
}

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for Undrill authentication (referred generically as an API key credential).
  • Uses the Node.js crypto module internally to create a SHA-256 hash combining the workflow ID and client ID.
  • The workflow ID is retrieved from the current n8n workflow context.

Troubleshooting

  • Invalid license key error: If the license key does not match the expected hash of the workflow ID and client ID, the node throws an error stating "Invalid license key. Please contact Undrill support." To resolve this, ensure that the correct client ID is provided and that the license key credential is properly configured.
  • Unknown error occurred: If any unexpected error happens during execution and the node is set to continue on fail, it will output a generic error message. Check the node configuration and credentials.
  • Make sure the Undrill API key credential is correctly set up and linked to the node.
  • Verify that the workflow ID has not changed unexpectedly, as it is part of the license validation hash.

Links and References

  • No external links are provided in the source code. For more information, consult the official Undrill documentation or support channels.

Discussion