stormy-gold•2mo ago
Extract call id from workflow used for incoming calls
Hello, is it possible to get the call id somehow before or at the start of the workflow? I checked some answers like to use call.id(call object does not exist in workflow, call.id is always empty), or create a webhook on call start(there isn't any option to create webhook in VAPI UI at the moment). Is it possible to somehow get the call id?
14 Replies
Thank you for your question! To clarify, are you looking to access the call ID within the workflow logic itself (e.g., in a script or node), or do you need to retrieve it externally via API or dashboard right as the call starts? This will help me suggest the most relevant approach for your use case.
Sources:
- Vapi API Reference: Get Call
- Vapi Issue Reporting: Finding Your Call ID
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
stormy-goldOP•2mo ago
I'd prefer to have access to it within the workflow, but if I can get it using an API as the call starts it would be ok as well. (Of course I do not want to find the call id manually just to clarify)
@Duckie
Thank you for clarifying your preference. To help suggest the best approach: Are you using any custom nodes (like API Request) or scripting within your workflow, or are you limited to the standard workflow builder UI? This will help determine if there’s a way to programmatically access the call ID at the start of the workflow.
Sources:
- Vapi API Reference: Get Call
- Vapi Workflows: API Request Node
stormy-goldOP•2mo ago
I use the standard workflow builder UI @Duckie
Currently, the standard workflow builder UI does not provide access to the call ID within workflow nodes. If you need the call ID as soon as a call starts, the recommended approach is to set up a Server URL (webhook) programmatically for your phone number—this will send call events (including the call ID) to your endpoint automatically. Unfortunately, this cannot be configured directly in the UI at this time.
Reference: Vapi Workflows: API Request Node Source: - Vapi Workflows: API Request Node
Reference: Vapi Workflows: API Request Node Source: - Vapi Workflows: API Request Node
stormy-goldOP•2mo ago
Can you show me how to set up a Server URL (webhook) programmatically for my phone number? The link you send me doesn't work, it says page not found. @Duckie
To set up a Server URL (webhook) for your phone number programmatically, use the following cURL command (replace placeholders with your actual values):
This will configure your phone number to send call events (including the call ID) to your webhook as soon as a call starts.
Reference: Setting Server URLs Sources: - Setting Server URLs - Update Phone Number API
Reference: Setting Server URLs Sources: - Setting Server URLs - Update Phone Number API
stormy-goldOP•2mo ago
Server URL works but hits my URL like 50 times per call. Is there a way to hit my webhook only ONCE when the call starts? @Duckie
To receive your webhook only once when the call starts, filter for the
Reference: See event filtering in the webhook CLI documentation. Source: - Vapi CLI Webhook Documentation
call-started event using the CLI. Update your listener command as follows:
This will ensure your webhook is triggered only for the call-started event, preventing multiple hits per call.Reference: See event filtering in the webhook CLI documentation. Source: - Vapi CLI Webhook Documentation
stormy-goldOP•2mo ago
I set up server url on VAPI UI. Is it possible to add the event listener from there as well? @Duckie
Thank you for your question! Just to clarify: Are you looking for a way to filter webhook events (e.g., only receive the
call-started event) directly from the VAPI UI, or are you open to using the CLI for this filtering? This will help me provide the most relevant guidance for your setup.
Source:
- Vapi CLI Webhook Documentationstormy-goldOP•2mo ago
directly from the VAPI UI @Duckie
Currently, the VAPI UI does not support filtering webhook events (such as only receiving
All events are sent to your configured server URL without filtering options in the UI. If you need event filtering, this can only be done using the CLI with the
For updates or feature requests, you may want to follow Vapi's changelog or contact support.
See webhook CLI documentation for details Source: - Vapi CLI Webhook Documentation
call-started) directly from the interface.All events are sent to your configured server URL without filtering options in the UI. If you need event filtering, this can only be done using the CLI with the
--filter flag at this time.For updates or feature requests, you may want to follow Vapi's changelog or contact support.
See webhook CLI documentation for details Source: - Vapi CLI Webhook Documentation
Hi, currently workflows is under development.