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