Error Using Google Sheets Tools with AI Agents: "Invalid 'tools[1].function.name'"

Hi community,

I’m trying to use Google Sheets tools with an AI agent in n8n, but I keep getting this error:

Bad request - please check your parameters  
Invalid 'tools[1].function.name': string does not match pattern. Expected a string that matches the pattern '^[a-zA-Z0-9_-]+

It seems that the function name for the tool doesn’t meet the required pattern. According to the error, valid names should only contain letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-), and must avoid special characters like ñ, spaces, or accents.

I’ve tried different models and renamed functions, but the issue persists.

for example when i use Mistral AI it gives me this error:

API error occurred: Status 400 Content-Type application/json Body {"object":"error","message":"Function name was Añadir_o_Actualizar_fila but must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.","type":"invalid_request_error","param":null,"code":null} 

I know it’s in Spanish, but the name of the tool can’t be changed. it’s fixed.

Has anyone encountered this problem or found a solution? Any help would be greatly appreciated.

Thanks in advance!.

EDIT:

  • n8n version: 1.77.3
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Digital Ocean

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

I get the same error because I used a Google sheet named “Întrebări”. After renaming the file to “FAQs” it is working fine.

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