State Management and Reopening of Closed Omnichannel Dialogues in Rocket.Chat

Implementation Context (Already Configured):

1. Integration Platform: n8n.

2. Target System: Rocket.Chat (Omnichannel).

3. Trigger Logic: An incoming message from a new customer in the messenger is received by n8n.

4. Action: n8n uses the Rocket.Chat API to create a new Omnichannel Chat.

The Current Task (Problem and Goal):

The Problem: Omnichannel chats in Rocket.Chat automatically close after a set period (1 hour).

The Consequence: If the customer writes again after this hour, the system creates a new Omnichannel chat.

The Goal: Implement logic within n8n that, upon receiving a new message from an existing customer, will check for a recently closed dialogue with this customer and, if found, reopen it to continue the conversation, instead of creating a new one.

The Question:

How can the mechanism for checking and reopening an old Omnichannel dialogue be technically implemented in n8n, using the Rocket.Chat API?

Is there anything else I can translate or help you with regarding your n8n workflow?

English only please.

How can I open an old chat instead of starting a new one, to see the entire conversation history?