This is my workflow, i am trying to do a chatbot with persisted memory but i can’t find any way to receive an identifier from eleven labs. (if have some upgrades i can do here i aprecciate the support).
I have some issues in eleven labs too, he doesnt understand names and dont say the text correctly.
I am using 1.91.2, cloud version of n8n
Hi André,
I had the same challenge when working with ElevenLabs and persistent memory in a chatbot setup using n8n. Here’s what I found:
Durable Identifiers with ElevenLabs
Currently, ElevenLabs doesn’t return a consistent identifier (like audio_id
or voice_id
) in a format that you can easily persist and re-use later for retrieval or tracking — especially if you’re using it via their API in a tool context.
What worked for me was:
- Manually generating my own sessionId based on the user input (like phone/email/chat ID) and passing it explicitly through the agent memory (I see you’re doing this already in your
Set
node — nice). - Storing a reference to the generated audio (or text output) in Postgres or Supabase using a custom ID.
- For voice accuracy issues: ElevenLabs sometimes fails with names or entities. I usually fix this by:
- Explicitly including name pronunciation hints in the prompt (e.g., “The name is Alcira, pronounced Ahl-see-rah”).
- Or preprocessing text with phonetic replacements before passing it to ElevenLabs.
Regarding Agent Memory
I noticed you’re using the Postgres Chat Memory
node — that’s great for persistence. Just make sure the sessionId
is always passed consistently from both webhook and chat trigger sources. Your Set
node handles fallback nicely ($json?.chatInput || $json.body.chatInput
), so you’re already on track.
Suggestion for ID Flow
If you’re generating audio from ElevenLabs and want to persist a usable ID, you could:
- Generate your own UID at the beginning of the flow (e.g.,
uuid()
ortimestamp-sessionId
) and attach it to the result. - Store that UID in a Postgres table along with the full ElevenLabs response (or audio URL).
- Use that same UID later to query memory, retrieve the audio, or do analytics.
Let me know if you’d like an example of how to persist audio generation history with your sessionId and retrieve it later for audit or reuse.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.