Unable to Add Query Parameters in Workflow API Cal...
# support
n
Hello, I am currently testing the new workflow feature. I want to use the block to make an API call. Unfortunately, my endpoint requires parameters in the query parameters, but in the block's interface, there is only an option to add them in the body... Do you have any solutions or upcoming modifications that will support this behavior? Additionally, I cannot hardcode the parameters because they depend on the previously received data.
v
Hi Noah! 😊 Great to hear you're testing the new workflow feature! I understand the need to include query parameters in your API calls, especially when they depend on previously received data. Currently, the ApiRequest node in Vapi workflows does support adding query parameters directly in the configuration. You can specify them in the
queryParameters
section of your API request. Here's a quick example of how you can set it up:
Copy code
json
{
  "task": "ApiRequest",
  "method": "GET",
  "url": "https://api.example.com/data",
  "headers": {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  },
  "queryParameters": {
    "param1": "{{dynamicValue1}}",
    "param2": "{{dynamicValue2}}"
  }
}
In this example,
{{dynamicValue1}}
and
{{dynamicValue2}}
can be replaced with variables that hold the values you received earlier in your workflow. As for upcoming modifications, there are enhancements planned that will further improve the handling of query parameters in API calls. The recent updates have already made it easier to define both
GET
and
POST
requests, and the ability to specify query parameters is part of that flexibility. You can check the [February 10, 2025 changelog](https://docs.vapi.ai/changelog/2025/2/10) for more details on these improvements. If you have any more questions or need further assistance, feel free to ask! 😊 Source: - [February 10, 2025 Changelog](https://docs.vapi.ai/changelog/2025/2/10)
Message marked as helpful by @Noah! 🎉
n
How can I modify the configuration? I am on the dashboard, but I don't see the option.
@User Can you help me ?
s
@Noah you can raise the feature request for it over here https://roadmap.vapi.ai