Parallel API calls
# support
s
Is it possible to have parallels API calls in the workflows to fetch some data to the context? Also I'm very curious, if it is possible to make the call after each user iteraction with a block (node) in the workflows.
v
Yes, you can trigger an API call after each user interaction with a workflow node by adding an API Request node immediately after a Conversation node. This lets you fetch fresh data and update the workflow context based on the user's latest input. Example:
Copy code
json
{
  "nodes": [
    { "type": "conversation", "name": "Ask for info", "isStart": true },
    { "type": "apiRequest", "name": "Fetch data", "url": "https://your-api.com/data", "method": "POST" }
  ],
  "edges": [
    { "from": "Ask for info", "to": "Fetch data" }
  ]
}
After the user responds, the workflow will automatically call your API and update the context for the next step. For more details, see the [workflow example](https://docs.vapi.ai/workflows/examples/property-management#add-api-request-node-for-tenant-lookup). Source: - [Property management call routing](https://docs.vapi.ai/workflows/examples/property-management#add-api-request-node-for-tenant-lookup)