(n8n+vapi)Need help creating tool to search a goog...
# support
r
Hi everyone. I have been using n8n, VAPI and Google sheets together to try make a simple tool that will search for the item by name or partial name in a google sheet, then return the other values(price and quantity). I have gotten n8n to filter the item from the google sheet and return the row with all the relevant data as a JSON but I cannot get the assistant to return that information. I need help creating the tool and setting up the parameters correctly. https://cdn.discordapp.com/attachments/1432737882623316059/1432737882975768626/image.png?ex=690224a2&is=6900d322&hm=c57f0d156373137fd4e19005bfe46faf6ffa1b04b2bb5ba8fe1549f57ade05b6& https://cdn.discordapp.com/attachments/1432737882623316059/1432737883600715996/image.png?ex=690224a2&is=6900d322&hm=b8a880a568e0d9ac5d327ba2b3c9f3a57eefcef5125482e2a7e8d6df5d68afbb&
v
It sounds like you've set up most of your workflow successfully—your n8n flow is able to filter the Google Sheet and return the relevant row as JSON, which is great progress! If the assistant is not returning the information from the JSON, the issue might be with how the data is being passed or parsed in the "Respond to Webhook" step. Here are a few things to check: - Make sure the output from the "Get Inventory" step is correctly mapped to the response in the "Respond to Webhook" node. In n8n, you typically need to reference the data fields explicitly (like
item_name
,
quantity
, and
price
) when setting up the response. - If you want to return all values from the row, ensure your response is set to output the entire JSON object (e.g.,
{{$json}}
), or specify each field you want to include. - Double-check the parameter setup for your function. Since your function expects an
item_name
(full or partial), make sure the incoming request to your webhook includes this parameter, and that it's being used in the filter logic. If you need to set up parameters for the tool, you can define them in your function or workflow as follows: - Parameter name:
item_name
- Type: string - Description: The item name or partial name to search for. Once the parameter is received, use it in your filter/search logic to find the matching row(s) in the Google Sheet, and then return the relevant fields in your response. If you have a specific error message or need help with a particular step in n8n or VAPI, please share more details and I'll do my best to assist!
r
The assistant seems to hallucinate and return values for quantity and price that are not the same as in the google sheet. If I do not specify the item name exactly then it doesn't even find a relevant item. I need help refining the tool to search without needing the exact item name @User
I need to change what the toolcall result is as the "content": "Success." needs to have the values of quantity and price
@User @Vapi Support Bot
v
Message marked as helpful by @reCoiL! 🎉
r
The assistant seems to hallucinate and return values for quantity and price that are not the same as in the google sheet. If I do not specify the item name exactly then it doesn't even find a relevant item. I need help refining the tool to search without needing the exact item name @User Support Bot
I need to change what the toolcall result is as the "content": "Success." needs to have the values of quantity and price @Vapi Support Bot
3 Views