How to share chat history via email?

Describe the problem/error/question

I’m trying to replicate the solution listed here but to no avail. When the email sends, it’s blank with Chat history: Human: {{ $json.chatInput }}

What is the error message (if any)?

Chat history: Human: {{ $json.chatInput }} - I have tried running this both in one workflow and in seperate workflows where one calls another. This sends the email but the result is blank.

Please share your workflow

Share the output returned by the last node

not sure how to get this

Information on your n8n setup

  • n8n version: self hosted
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: Ubuntu 22.04

Hi @Sherimedia

Thanks for posting here and welcome to the community! :cake:

It looks like all you need to do is toggle the expression mode, so that the {{ $json.chatInput }} gets evaluated when passed onto the tool.

Thank you for the reply Ria, that seems to have fixed sending the chatInput, however I don’t appear to get the complete history of the conversation to be sent on the email, only the last message is sent from the human. I would certainly appreciate any tips you could provide.

message_export

Hi @Sherimedia

it should work if you send both the {{ $json.sessionId }} and the {{ $json.chatInput }} in the tool?

Hello, I’m wondering if it’s a problem with the memory and perhaps I should use something else, as only the last ‘human’ input message is being sent on email, so not the entire history.

I’ll experiment storing the data and then asking an agent to summarise after each session and send the summary on email, although it seems more complex to do it this way. Open to tips and wise words :grinning:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.