ltd-scarletL
VAPI6mo ago
ltd-scarlet

WorkflowOverride variableValues

When I receive a webhook with type: assistant-request i am preparing my responce and sending it back to the workflowId (specific workflow).

{
    "workflowId": "this-is-my-workflow-id",
    "workflowOverrides": {
      "variableValues": {
        "first_name": "Peter"
    }
  }
}

at the workflow i add this varuable {{first_name}} at the prompt and at the first message of the conversation node, and when call (inbound) my phone number, the agent did not see the value of the variable.

  • The phone number is imported and it is not assigned to a specific workflow.
According to the documentation: https://docs.vapi.ai/api-reference/webhooks/server-message#response.body.messageResponse.AssistantRequest.workflowOverrides.variableValues this is the right way to respond to the webhook in order to override the variables at the Workflow.

Please for your help because I am stucked with this and can not continue. My workarround is to start with an api call first and get the data and then start the conversation but this is not ideal for me.
Was this page helpful?