Help Needed: Persistent "Bad Request" Error with n8n HTTP Request Node and Vapi API

Hi everyone,

I’m new to n8n and I’m working on a project for an assignment. I’m trying to build an outbound AI lead qualification agent, but I’m completely stuck on an error and my deadline is approaching. I would be extremely grateful for any guidance.

My Project Goal: The workflow should:

  1. Trigger when a new row is added to a Google Sheet (containing a lead’s name and phone number).

  2. Use the HTTP Request node to send an API call to Vapi (on a free trial) to initiate a phone call to that lead.

  3. The Vapi AI agent then qualifies the lead.

The Problem: The Google Sheets trigger works perfectly and pulls the data. However, the HTTP Request node consistently fails with the error: Problem in node 'HTTP Request' - Bad request - please check your parameters.

My HTTP Request Node Setup:

  • Method: POST

  • URL: https://api.vapi.ai/call/phone

  • Authentication: Generic Credential Type → Header Auth

    • Credential Name: Authorization

    • Credential Value: Bearer [MY_VAPI_API_KEY]

  • Send Body: Toggled ON

  • Body Content Type: JSON

  • Specify Body: json

  • JSON Body Code:

    JSON

    {
      "assistantId": "[MY_VAPI_ASSISTANT_ID]",
      "customer": {
        "number": "{{ $json['Phone Number'] }}"
      }
    }
    
    

What I’ve Already Tried: I feel like I’ve tried everything, including:

  • Generating a brand new Private API Key from Vapi and creating a new credential in n8n.

  • Confirming the assistantId is copied correctly from the Vapi URL and pasted in the JSON.

  • Using a valid US-based phone number (from TextNow) in the Google Sheet to avoid free trial limitations. The number is in the correct +1... format.

  • Confirming my Google Sheet column is named exactly Phone Number.

  • Deleting and recreating the HTTP Request node from scratch.

I’ve been stuck on this for several days. If anyone can spot a mistake in my setup described above, I would really appreciate the help.

Thank you in advance!

Hi @Zarim I don’t think Vapi API can call international phone numbers with free trial. I seems it’ has to be US phone numbers.

I did make an HTTP Request to the APi to call but got 400 status code error

Thank you so much for helping, but I’m using US number and same error occurs. @c0d33ngr

@Zarim Oh.. I see.
I did try it out with a friend US phone number and it HTTP Request node seem to send the request.

I think it’s your json sttucture - It’s not complete, no phoneNumberId

@c0d33ngr still not working, :slight_smile:

@Zarim This basic workflow above, make a request to Vapi API. You should try make a single request using the workflow

Also, it would helps if you share some visuals from your end - like the exact error messages, nodes or something to assist

@c0d33ngr bro is there any way we can discuss this on call or something like?

@Zarim Your endpoint is wrong. It’s https://api.vapi.ai/call NOT https://api.vapi.ai/call/phone

Here’s quickstart guide from Vapi API documentation Phone calls | Vapi

You can also send me private DM too via [email protected]

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