How can a community node connect to Redis without using restricted imports?

Hi everyone,

I’m developing a community node called n8n-nodes-message-debounce that implements a message debounce/buffering system using Redis as the state store. The node groups multiple messages from the same session within a configurable time window before passing them along as a single consolidated output.

The problem is that to connect to Redis, I need either native Node.js modules like net and tls for raw TCP connection, or an external package like ioredis or redis. Both approaches are blocked by the @n8n/scan-community-package scanner.

I also tried using this.helpers.createRedisClient('redis') based on some references I found, but this helper does not exist in the current version (2.6.3).

The native n8n Redis node uses the redis npm package internally, but community nodes don’t have access to that.

My question is: what is the intended way for a community node to connect to Redis and pass the scanner verification? Is there a helper or pattern I’m missing?

The node is already published and working on self-hosted instances: https://www.npmjs.com/package/n8n-nodes-message-debounce

Thanks!

Hey @danielreisj,
Welcome to the community

there is no official “createRedisClient” helper available for community nodes, I’ll recommend to use Redis nodes or API-based integrations instead of raw Redis client code.

Try this:
Instead of trying to open a TCP/Redis connection from inside a custom node, you should use one of the existing built-in Redis nodes (e.g., Redis, Redis Trigger, Redis Chat Memory, Redis Vector Store) which already have scanner-friendly implementations and credentials support.
Or
you can use n8n’s HTTP Request node + an external Redis API service (if you expose Redis through an HTTP interface) which avoids using low-level modules.
Or
if your logic absolutely requires direct Redis client usage, wrap that functionality in an external microservice/API (e.g., a small server that your node calls via HTTP), so your community node stays scanner-compliant.

Let me know if it helps

Yeah the scanner blocks all external packages on purpose so there’s no way to use ioredis or redis directly and pass verification. Your best bet is switching to something like Upstash which gives you a REST API for Redis, that way you can just use this.helpers.httpRequest() which the scanner is fine with. Same Redis functionality, just over HTTP instead of TCP.

Honestly there’s no way around the scanner for TCP-based Redis connections, n8n doesn’t allow runtime dependencies in verified community nodes and there’s no Redis helper exposed either. Your best bet if you want verification is to swap to an HTTP-based Redis like Upstash and use this.helpers.httpRequest() instead, or if you’re self-hosting anyway you could put something like serverless-redis-http in front of your Redis instance to get a REST API.

Yeah unfortunately there’s no blessed way to do this right now, the scanner intentionally blocks raw TCP and external redis clients so community nodes can’t open arbitrary network connections. Your best bet is probably to request an exception or lobby for a createRedisClient helper on the n8n GitHub, because the architecture just doesn’t support what you’re trying to do from a community node without bypassing the scanner. For self-hosted users who don’t care about the scanner it works fine obviously but it’ll never pass for the community node listing as-is.