How to check if conversation is completed

Hello, I am working on a workflow that connects to a Relevance AI agent and triggers and retrieves a conversation from it. However, after the conversation is triggered by the first node, it takes about 60 seconds for the conversation to finish in Relevance AI even though the n8n node moves on. Running the “Retrieve Conversation from Agent” n8n node after the conversation is complete will successfully retrieve the conversation, but if ran before the conversation is finished it will not include the conversation in its output. Therefore, the check conversation, if, and wait nodes in the middle of my workflow need to check the conversation status in some way, and if not completed, wait before trying again. I don’t know how to do this though so any help is greatly appreciated!

Information on your n8n setup

  • n8n version: Newest
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: Mac

Its simple just keep a wait time of 75 seconds between Relevance AI and next step, I think this should work

Do let me know

1 Like

Messing with it for longer has made me realize that the agent varies in the time it takes to finish the conversation. While a longer wait node would work, is there a way to have it check the conversation for the most efficient process? I’ll be running multiple of these in the workflow so having the less time will make it much faster

I believe you might have to create a custom code to check for server response and then continue the workflow

Just a suggestion

1 Like

I haven’t had much success with custom code nodes so far, but I’ll try it for sure. I’m thinking that I should be able to do it using the one of the outputs of this node that accesses the conversation and returns info such as conversation_id and others.

Thank you for the help! I think I’m really close to completing my workflow :+1: