# Postgres Memory Problem

**URL:** <https://community.n8n.io/t/postgres-memory-problem/145591>\
**Category:** Questions\
**Tags:** postgres, openai\
**Created:** [July 8, 2025, 2:03am UTC](https://community.n8n.io/t/postgres-memory-problem/145591 "2025-07-08T02:03:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jotyrojo](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jotyrojo/32/99015_2.png) [@jotyrojo](https://community.n8n.io/u/jotyrojo)\
**Post date:** [July 8, 2025, 2:03am UTC](https://community.n8n.io/t/postgres-memory-problem/145591/1 "2025-07-08T02:03:08Z")

</div>

Greetings,

I’ve been having problem with my Postgres memory whenever I try to upload a file using telegram. For some reason the AI agent keeps sending two outputs to the memory. I already tried changing the memory to a simple one, but the same error keeps happening. So, it must be the AI agent node, from my understanding. How can I fix that?

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/e/2/e2b86b601a5338216412e26b6f41c98bc1dfad2c.jpeg)

This is my workflow:

## Share the output returned by the last node

## Information on your n8n setup

- \*\*n8n version: 1.99.1
- **Database (default: SQLite):**
- \*\*n8n EXECUTIONS\_PROCESS setting default: own, main
- \*\*Running n8n via: Docker
- \*\*Operating system: Ubuntu 24.04

---

<div class="post-metadata">

**Author:** ![withabdul](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/withabdul/32/179439_2.png) [@withabdul](https://community.n8n.io/u/withabdul)\
**Post date:** [July 8, 2025, 3:08am UTC](https://community.n8n.io/t/postgres-memory-problem/145591/2 "2025-07-08T03:08:41Z")

</div>

try to make the ID as a string with add double quotation mark (") to your key.  
in ur case, you can try this `"{{ $('Receive Message').item.json.message.chat.id }}"`

---

<div class="post-metadata">

**Author:** ![jotyrojo](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jotyrojo/32/99015_2.png) [@jotyrojo](https://community.n8n.io/u/jotyrojo)\
**Post date:** [July 8, 2025, 6:02pm UTC](https://community.n8n.io/t/postgres-memory-problem/145591/3 "2025-07-08T18:02:18Z")

</div>

That was the problem. Thanks a lot @withabdul!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [July 15, 2025, 6:02pm UTC](https://community.n8n.io/t/postgres-memory-problem/145591/4 "2025-07-15T18:02:35Z")

</div>

Closed on July 15, 2025, 6:02pm UTC

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