Invalid schema error when using Supabase tool with AI Agent: "got 'type: None'"

“Hi everyone,
I’m new to n8n and currently building my first agentic workflow. I am trying to create an AI assistant that fetches order details from Supabase, but I’m encountering a blocking error.
The Issue:
When I run the workflow, the OpenAI Chat Model node throws this error:
Bad request - please check your parameters. Invalid schema for function ‘Get_many_rows_in_Supabase’: schema must be a JSON Schema of ‘type: object’, got ‘type: None’.
My Configuration:
System Prompt:
“You are a helpful customer support assistant for a delivery service. Your goal is to provide tracking information to customers.
DATABASE TOOL USAGE: You have a tool ‘Get many rows in Supabase’ to check order details. When a user mentions a tracking ID (like TRK001, TRK002), you MUST call this tool. You must extract the tracking ID from the user’s message and pass it as the ‘tracking_id’ parameter.
RULES: If the user does not provide a tracking ID, politely ask them to provide one. Do not make up any tracking IDs. After getting the data from the tool, present it in a simple, friendly way to the user. If the tool finds no data, tell the user that the ID could not be found.”
Tool Description:
“You are a Supabase database tool. When the user asks for order status, call this tool with the argument ‘tracking_id’. If you don’t have the tracking_id, ask the user for it.”
I have attached a screenshot (image_fb5062.png) showing the error and the prompt setup. Even though I have defined these instructions, the AI Agent seems to be receiving the schema as ‘None’.
Additionally, I noticed that the Supabase node itself struggles to load parameter options (showing an ‘[object Object]’ error), which might be the root cause.
Since this is my first agentic workflow, I would appreciate any guidance on how to properly map this tool so the AI Agent recognizes the schema correctly.
Thanks in advance for your help!”

Hi @Hassan_Zakria Welcome!
Have you tried removing the supabase sub node from the AI agent? And adding it before something like this, and then specifying the output of the supabase as your AI prompt.

No , i want ot gives the query to the agent
the agent fect the required fied data fron the quert like (please tell me about traing id TXR002?
then the agent takes the traking id frm the query as from the chat msg then pass to the supabase and get response and show to the user

"No, that wouldn’t work for my use case.

My goal is to give the user query directly to the AI Agent. I want the Agent to be smart enough to:

  1. Parse the user’s message (e.g., ‘Please tell me about tracking ID TRK002’).

  2. Automatically extract the tracking_id from the chat message.

  3. Use that extracted ID to call the Supabase tool dynamically.

  4. Finally, get the response from Supabase and present it back to the user in a natural way.

Essentially, I want a fully agentic flow where the LLM handles the tool execution based on the intent it identifies in the chat. My current issue is that the Supabase tool isn’t correctly accepting the schema or parameter mapping from the Agent, which is causing the ‘Invalid schema’ error.

Any advice on how to correctly configure the tool-calling mechanism for this specific agentic behavior?"

Can you share your workflow JSON?

how can i share?

i am new comer

Open your n8n ui, copy your workflow via Ctrl+A & Ctrl+c, and here you can either just paste the JSON or use the </> icon to paste the JSON inside.

{
“nodes”: [
{
“parameters”: {
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.chatTrigger”,
“typeVersion”: 1.4,
“position”: [
-32,
-672
],
“id”: “5e7aad09-3269-4974-bd5b-fcf6f0a89a7b”,
“name”: “When chat message received”,
“webhookId”: “311bd19e-bae6-4cb4-8ac4-f7ba020e19e4”
},
{
“parameters”: {
“options”: {
“systemMessage”: "You are a helpful customer support assistant for a delivery service. \nYour goal is to provide tracking information to customers.\n\nDATABASE TOOL USAGE:\n- You have a tool ‘Get many rows in Supabase’ to check order details.\n- When a user mentions a tracking ID (like TRK001, TRK002), you MUST call this tool.\n- You must extract the tracking ID from the user’s message and pass it as the ‘tracking_id’ parameter.\n\nRULES:\n- If the user does not provide a tracking ID, politely ask them to provide one.\n- Do not make up any tracking IDs.\n- After getting the data from the tool, present it in a simple, friendly way to the user.\n- If the tool finds no data, tell the user that the ID could not be found.\n\nEXAMPLE:\nUser: “What is the status of TRK005?”\nAction: Call the tool with ‘tracking_id’ = “TRK005"”
}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 3.1,
“position”: [
208,
-736
],
“id”: “da119bac-8e97-4071-bfc0-9124c36c2ad5”,
“name”: “AI Agent”
},
{
“parameters”: {
“model”: {
“__rl”: true,
“value”: “gpt-4o-mini”,
“mode”: “list”,
“cachedResultName”: “gpt-4o-mini”
},
“builtInTools”: {},
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatOpenAi”,
“typeVersion”: 1.3,
“position”: [
288,
-528
],
“id”: “147ff938-cf7f-4954-97d2-e6838c70114a”,
“name”: “OpenAI Chat Model”,
“credentials”: {
“openAiApi”: {
“id”: “NF4S3eKJv5FCTMPc”,
“name”: “OpenAI account”
}
}
},
{
“parameters”: {
“descriptionType”: “manual”,
“toolDescription”: "“You are a Supabase database tool. When the user asks for order status, call this tool with the argument ‘tracking_id’. If you don’t have the tracking_id, ask the user for it.”,
“operation”: “getAll”,
“tableId”: “products”
},
“type”: “n8n-nodes-base.supabaseTool”,
“typeVersion”: 1,
“position”: [
544,
-560
],
“id”: “e1e34934-905e-4d79-bf25-1c3b056832d4”,
“name”: “Get many rows in Supabase”,
“credentials”: {
“supabaseApi”: {
“id”: “e6UGh1aIBhSbz7on”,
“name”: “Supabase account”
}
}
}
],
“connections”: {
“When chat message received”: {
“main”: [
[
{
“node”: “AI Agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“OpenAI Chat Model”: {
“ai_languageModel”: [
[
{
“node”: “AI Agent”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“Get many rows in Supabase”: {
“ai_tool”: [
[
{
“node”: “AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “efad84012d1d6d45a70ccb2afe749159de8cb907bf9108a510c506371d5a8d01”
}
}

this json data?

yes! As I can see, you are using the Supabase tool’s Get Many operations. Why is that? If you wanted to extract a certain ID, like

Just use the get row and pass your ID there and in the ID field, click on the Star icon on the right so that AI can fill that field and add a good description of that field.

ok bt i tried this and not solved
my local host relaunch so i will share as soon as possible in some minutes

Let me know how that goes!

@Hassan_Zakria

Can you try this?

yes sir i am working on this

is the last img the agent gerate the fied automaticaly to gives the value to the supabase

Please try my workflow. Imput with your own credentials, @Hassan_Zakria

ok i try this

i try ypur workflow bt same error occurs

@Hassan_Zakria i think you should give Get a row a try with supabase and add a filter tracking ID see this:

same error with your workflow
i also tried this for 30+ hours but still getting this error
my patience is running out but i want to solve this because this is my learning part

but when i try tracking id filter in the supabase tool then supabase retrieves the correct row data
but by the agent or by supabase gives this error
so the integration with each other produces error like schema mismatch

@Hassan_Zakria , try this

Open the “Get Order Details” Code node and replace these two lines with your actual Supabase project values :

const SUPABASE_URL = 'https://YOUR_PROJECT_ID.supabase.co';
const SUPABASE_ANON_KEY = 'YOUR_SUPABASE_ANON_KEY';

You can find both in your Supabase dashboard. Does it work now?