# PostgreSQL tool error for OpenAI Message Assistant node

**URL:** <https://community.n8n.io/t/postgresql-tool-error-for-openai-message-assistant-node/59642>\
**Category:** Questions\
**Created:** [October 24, 2024, 2:51pm UTC](https://community.n8n.io/t/postgresql-tool-error-for-openai-message-assistant-node/59642 "2024-10-24T14:51:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_S](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mark_s/32/47188_2.png) [@Mark\_S](https://community.n8n.io/u/Mark_S)\
**Post date:** [October 24, 2024, 2:51pm UTC](https://community.n8n.io/t/postgresql-tool-error-for-openai-message-assistant-node/59642/1 "2024-10-24T14:51:21Z")

</div>

## Describe the problem/error/question

Hey

I’m trying to setup tools for OpenAI Message Assistant node. I have this error for postgreSQL Executy Query tool. It works well for another query with dynamic variable + it works well with static value.

## What is the error message (if any)?

No execution data available

## Please share your workflow

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/7/6/76204a4ca54740f8d3e9c671952ae6864597bddf.jpeg)

## Share the output returned by the last node

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/b/9/b9ed5883387f698e0ff8ae36f1cc1c31ef77c3a6.png)

## Information on your n8n setup

- **n8n version:** 1.63.1
- **Database (default: SQLite):** PostgreSQL internal
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** Docker
- **Operating system:**

---

<div class="post-metadata">

**Author:** ![ria](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ria/32/99251_2.png) [@ria](https://community.n8n.io/u/ria)\
**Post date:** [October 29, 2024, 10:36am UTC](https://community.n8n.io/t/postgresql-tool-error-for-openai-message-assistant-node/59642/2 "2024-10-29T10:36:45Z")

</div>

Hi @Mark_S

Thanks for posting here and welcome to the community! 🎉

We’ve already merged a fix for this bug and it should be released soon.

> <https://github.com/n8n-io/n8n/pull/11397>
>
> \## Summary
> This fixes an issue with resolving \`$fromAI\` expression when combine…d with \`noDataExpression\` and \`evaluateExpression\`. Because we're calling \`.execute\` of the wrapped tool node directly, the execute functions(\`getExecuteFunctions\`) would get created with references to the root node, and the root node's name would be passed in \`evaluateExpression\`. 
> To fix this, I changed \`evaluateExpression\` to be a named function so that it could access the current node's context and use \`this.getNode().name\` to get the node's name to resolve the expression.
> 
> \## Related Linear tickets, Github issues, and Community forum posts
> \- https://github.com/n8n-io/n8n/issues/11209
> 
> \## Review / Merge checklist
> 
> \- \[\] PR title and summary are descriptive. (\[conventions\](../blob/master/.github/pull\_request\_title\_conventions.md)) 
> \- \[\] \[Docs updated\](https://github.com/n8n-io/n8n-docs) or follow-up ticket created.
> \- \[\] Tests included. 
> \- \[\] PR Labeled with \`release/backport\` (if the PR is an urgent fix that needs to be backported)

Let us know if this fixes it for you! 🙂

---

<div class="post-metadata">

**Author:** ![Mark\_S](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mark_s/32/47188_2.png) [@Mark\_S](https://community.n8n.io/u/Mark_S)\
**Post date:** [November 18, 2024, 6:45pm UTC](https://community.n8n.io/t/postgresql-tool-error-for-openai-message-assistant-node/59642/3 "2024-11-18T18:45:19Z")

</div>

Hello!  
Thank you for response. I updated my version and have new error. Agent trying to run simple query that works well with PostgreSQL node but fails with tool.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/5/b/5be8891c0be7d5c18ce54d616e25bd57d02cfe91.png)  
 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/4/c/4c2ccd90be47aff90b8e0e61e313ab34499de8ae.png)

---

<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:** [February 16, 2025, 6:45pm UTC](https://community.n8n.io/t/postgresql-tool-error-for-openai-message-assistant-node/59642/4 "2025-02-16T18:45:39Z")

</div>

Closed on February 16, 2025, 6:45pm UTC

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