I’m building a WhatsApp chatbot using n8n, and I’m trying to manage user inactivity.
Currently, I’m storing some user data in a Redis instance, and I have a flow that removes the keys using TTL. The issue is that the Redis Push node doesn’t have a TTL option.
What I’d like to do is detect user inactivity — for example, based on the last message received by the WhatsApp trigger — and automatically delete the keys related to that user or flow when they’ve been inactive for a certain amount of time.
Does anyone know a good approach to handle this kind of inactivity logic in n8n?
There is a good pattern for cleaning up inactive users when using Redis with WhatsApp flows?
Thanks in advance for your help!
Please share your workflow
Information on your n8n setup
- n8n version: 1.106.3
- Running n8n via (Docker, npm, n8n cloud, desktop app): Cloud
- Operating system: Windows