I cannot connect the snowflake tool with the AI agent

Describe the problem/error/question

I am using an AI agent that answers question of a chat creating a SQL query, receiving the results and answering in natural language. the problem is that the snowflake tool never receive the query of the agent but in the output I can see that the agent do generate the query.

What is the error message (if any)?

SQL compilation error: syntax error line 1 at position 0 unexpected ‘undefined’.

Please share your workflow

Share the output returned by the last node

cuantas filas tiene la tabla global_orders?

No puedo responder tu pregunta en este momento debido a falta de información suficiente.

Aditional information:

When I see the intermediate step of the agent, I can see he create the query correctly.

But It lookl like the snowflake tool does not receive anythin:

Information on your n8n setup

  • **n8n version: 1.81.4
  • **Database (default: SQLite): Snowflake
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
  • **Operating system: MAC

@Eduardo_Chain, could you put the workflow inside of a codeblock? You can do that by clicking on the codeblock button and pasting the workflow code inside of the code block.

Get code block

Paste code inside of codeblock

I did it, thanks

Hey @Eduardo_Chain, how did you come up with the expression that you’re using in the Snowflake tool? What are you trying to reference here? You probably want to use $fromAI here.

It worked!

I put this expression in my snowflake tool:

{{$fromAI(“query”)}}

Thanks!

1 Like

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