MySQL node and similar - Make SQL query field support expressions

Describe the problem/error/question

I really would like to have the SQL query field in the MYSQL node, Postgres node and similar to be able to support expressions. Same about when setting custom JSON schemas in some of the nodes.
At the current moment if you imagine the need to provide custom SQL queries to the MYSQL node there is no way to do it if you do not use an SQL agent which is a bit of an overkill for some simple SQL queries. At the current state of things you could pre-set the SQL query with the Set node but there is no way to put that query in the query field in the MYSQL node. Absolutely the same situation with nodes where you have to put custom JSON schemas. And I guess with many other that support the same field type as on my screenshot.

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

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

Hey @TheBestBro,

It should already support expressions but we have turned off the option to pick between the 2 options so what you have is a field that you can just type in and include an expression and it should just work.

This is the MySQL node from 1.68.0 as an example.

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