I built a Telnyx Conversational Workflows example for auto insurance claim intake.
The main idea is simple: when a voice agent has to do a lot, one big prompt can get hard to manage.
For intake calls, there are usually a bunch of paths to handle:
- missing information
- safety checks
- fallback paths
- priority follow-up
- backend tool calls
This example models the call as a workflow instead of putting everything into one prompt.
The workflow handles the conversation path. A small Node.js/Express backend exposes tool endpoints for structured actions:
POST /tools/create-claim-intakePOST /tools/log-claim-intake-fallbackPOST /tools/flag-priority-follow-upGET /health
I like this pattern because it makes the flow easier to inspect. You can see the nodes, branches, and tool calls instead of trying to debug everything from prompt behavior.
Run it:
git clone https://github.com/team-telnyx/telnyx-code-examples.git
cd telnyx-code-examples/build-conversational-workflow-nodejs
cp .env.example .env
npm install
npm test
node server.js
Code example:
[https://github.com/team-telnyx/telnyx-code-examples/tree/main/build-conversational-workflow-nodejs]
Top comments (0)