Workflow created with API throws error when trying...
# support
d
- created a workflow with the API - was created successfully - fetching the workflow with the GET API works - but, attempting to view the workflow in https://dashboard.vapi.ai/workflows/ - gives the following error (seems like some frontend error) ``Error: TypeError Message: Cannot read properties of undefined (reading 'length') Timestamp: 2025-06-11T21:36:47.919Z`` - all the other workflows i've created were done using the web UI and they all load/work fine - just this first one i've created with the API that doesn't work. https://cdn.discordapp.com/attachments/1382474018241908858/1382474018417934366/image.png?ex=684b48c3&is=6849f743&hm=7f80c97e740572152bccb6346adb4b001f7719b7f9d424c50c346cb9bd0afc00&
v
Thank you for the detailed report. To help diagnose the dashboard error, could you please share the exact JSON payload you used to create the workflow via the API? This will help identify if any required fields are missing or incorrectly formatted. Sources: - [Workflows documentation](https://docs.vapi.ai/workflows) - [Changelog May 9, 2025](https://docs.vapi.ai/changelog/2025/5/9)
c
Hey, really sorry for your experience. If possible, could you record a loom video describing this error/behavior or inconsistency in the dashboard with the steps to reproduce it? That way, I can share this with my team, and we'll take a look. We'll even try to reproduce the same so we can fix it for you. Also, I'll request you to share your workflow ID.
j
Getting the same error. Work around was: The error "Cannot read properties of undefined (reading 'length')" occurs when VAPI's dashboard JavaScript tries to process workflow elements and encounters unexpected data structures. šŸ’” Smart Solution - "Behavior Consolidation": Instead of: Spreading complex Alex Brown behaviors across many nodes We did: Consolidated everything into the globalPrompt This works because: globalPrompt is processed as a single text field Individual node prompts get parsed separately by the buggy renderer Global prompts bypass the complex parsing logic that causes crashes
c
Hey, could you share your org_id and workflow URL? That way, I can look into this for you.
m
I also receive this error consistently for any workflow I create via API. The workflows are functional (I can use them in phone and web test calls), but will always display the length error in the dashboard. Example: workflow 805b3673-e045-40b9-a82e-ff656f9b1c80 org id: 241b05d4-4c66-4619-abfe-af7d4c0c5b5d
c
Please use this documentation page to get the workflow configuration. Use the private VAPI API key as the bearer token and copy the workflow id into the id field, then once the cURL request is made on the GET workflow endpoint, send the configuration as a .json file to us for investigation.