pipedream icon indicating copy to clipboard operation
pipedream copied to clipboard

elevenlabs: fix make-outbound-call body field (agent_phone_number_id) + add list-agent-id-options

Open VibhanshuPandey opened this issue 5 months ago • 8 comments

## WHY

elevenlabs-make-outbound-call sends the agent phone number under the body key agent_phone_number, but the ElevenLabs API requires agent_phone_number_id (docs). As a result every call made with this action fails:

422: { "detail": [{ "type": "missing", "loc": ["body", "agent_phone_number_id"], "msg": "Field required", "input": null }] }

(Reproduced today against api.elevenlabs.io with a valid agent, an imported Twilio number, and a verified recipient.)

The mismatch has existed since the action was introduced in #16187. The endpoint path itself (convai/twilio/outbound_call) still resolves — only the body field name is wrong.

Changes

  • make-outbound-call: body field agent_phone_number → agent_phone_number_id (the prop was already named agentPhoneNumberId and populated from the phone-number propDefinition, so only the API payload key changes). Also updated the documentation link in the description — the old URL returns 404.
  • New action list-agent-id-options: mirrors the existing list-phone-number-id-options, exposing the already-defined agentId propDefinition options. Unlike the phone-number one, agentId options are cursor-paginated (page_size: 30), so the action follows the cursor to return all pages.
  • Version bumps: make-outbound-call 0.0.5 → 0.0.6, new action 0.0.1, package 0.5.0 → 0.5.1.

Summary by CodeRabbit

  • New Features

    • Added an ElevenLabs action to list available Agent ID options, retrieving results across all pages (label/value pairs) via cursor-based pagination.
  • Bug Fixes

    • Updated the outbound-call action to use the correct phone number field (agent_phone_number_id) and refreshed the documentation link; also bumped the action version.
  • Chores

    • Bumped the ElevenLabs package version to 1.0.0.

Issue

Closes #21185

VibhanshuPandey avatar Jun 06 '26 11:06 VibhanshuPandey

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Jun 17, 2026 9:56am

Request Review

vercel[bot] avatar Jun 06 '26 11:06 vercel[bot]

Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.

Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4cbdcae2-07b1-4dfe-b3c7-8c878384235b

📥 Commits

Reviewing files that changed from the base of the PR and between d98dcb19b823dc6b554d77be7e809671078b880e and 4a4c0f5a3a887f26a2dfc5730e51ede75f08a68b.

📒 Files selected for processing (3)
  • components/elevenlabs/actions/list-agent-id-options/list-agent-id-options.mjs
  • components/elevenlabs/actions/make-outbound-call/make-outbound-call.mjs
  • components/elevenlabs/package.json

📝 Walkthrough

Walkthrough

Adds a paginated ElevenLabs action to list Agent ID options using cursor-based pagination, updates the make-outbound-call action's documentation URL and Twilio payload field name, and bumps the ElevenLabs component version to 1.0.0.

Changes

ElevenLabs Component Updates

Layer / File(s) Summary
New list-agent-id-options action with pagination
components/elevenlabs/actions/list-agent-id-options/list-agent-id-options.mjs
Implements an action that uses cursor-based pagination via this.elevenlabs.listAgents with page_size 30, aggregates all agents across pages into an options array with { label: name, value: agent_id }, exports a $summary count, and returns the combined options.
Update make-outbound-call action metadata and payload
components/elevenlabs/actions/make-outbound-call/make-outbound-call.mjs
Updates action description URL to Twilio outbound-call API reference and version to 1.0.0, and changes the request payload field from agent_phone_number to agent_phone_number_id.
Bump ElevenLabs component version
components/elevenlabs/package.json
Updates component version from 0.5.0 to 1.0.0.

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is comprehensive, explaining the bug, the fix, and the new action, but the checklist items required by the template are not addressed. Complete the checklist section by marking the versioning and code review items as acknowledged or completed.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the two main changes: fixing the make-outbound-call body field and adding the new list-agent-id-options action.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Jun 06 '26 11:06 coderabbitai[bot]

Hi @vetrivigneshwaran 👋 — gentle nudge on this one whenever you have a moment. CI is green and the CodeRabbit feedback (minor version bump to 0.6.0) is addressed and resolved.

For context, this fixes a real bug in make-outbound-call — the Twilio payload field was sent as agent_phone_number instead of the API-required agent_phone_number_id, which returned a 422 — and adds list-agent-id-options for the Agent dropdown. Happy to make any changes you'd like. Thanks!

VibhanshuPandey avatar Jun 15 '26 12:06 VibhanshuPandey

Thanks for the review @vetrivigneshwaran — all three addressed in the latest push:

  1. Docs link — added [See the documentation](https://elevenlabs.io/docs/eleven-agents/api-reference/agents/list) to the list-agent-id-options description.
  2. API call in the app file — the action no longer reaches into the agentId propDefinition; it now calls the listAgents() method on elevenlabs.app.mjs directly and handles pagination/mapping itself.
  3. Version bump — bumped make-outbound-call to a major 1.0.0 (the request body field changed, so existing configs may need re-saving) and updated package.json to 1.0.0 as well.

Let me know if you'd like anything else!

VibhanshuPandey avatar Jun 16 '26 08:06 VibhanshuPandey

@VibhanshuPandey - Can you kindly add the issue id that is created. For tracking purpose.

vetrivigneshwaran avatar Jun 17 '26 09:06 vetrivigneshwaran

@vetrivigneshwaran done in 746f6553:

  1. Versions — reverted to a minor bump: make-outbound-call back to 0.0.6 and the elevenlabs package to 0.6.0.
  2. list-agent-id-options — now exposes the List Agents query params as props: search, page_size, archived, created_by_user_id, sort_by, sort_direction. cursor stays internal so the action still pages through all results.
  3. Tracking issue — opened #21185 and linked it in the PR description.

Thanks for the review!

VibhanshuPandey avatar Jun 17 '26 09:06 VibhanshuPandey