https://retellai.com/?utm_source=discord&utm_medium=seo logo
Can I create a batch call list through the site vi...
# ❓・ai-evy-support
h
@AI Evy Can I create a batch call list through the site via api integration? I'd like to reach out to convoso to grab a list of numbers and then call them. I'm trying to avoid building a custom solution for this right now.
a
Thanks for tagging me @hhbuddy. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can create batch calls through the API! Retell AI provides a Create Batch Call API endpoint that allows you to programmatically initiate multiple calls [(1) ]() . Here's how you can use the API to create batch calls:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const batchCallResponse = await client.batchCall.createBatchCall({
 from_number: '+14157774444',
 tasks: [{ to_number: '+12137774445' }],
}) ;
console.log(batchCallResponse.batch_call_id) ;
The API accepts: - `from_number`: Your purchased Retell number in E.164 format - `tasks`: An array of call tasks, each containing a
to_number
and optional
retell_llm_dynamic_variables
- `name`: Optional batch call name for reference - `trigger_timestamp`: Optional scheduling for future execution For your use case with Convoso, you would: 1. Make an API call to Convoso to retrieve your phone number list 2. Format the numbers into the
tasks
array structure 3. Call Retell's batch call API with your formatted data The batch calling feature supports scheduling calls for immediate dispatch or future timing, and pricing is $0.005 per dial [(2) ]() . You can monitor the progress and results through the dashboard or additional API calls [(3) ]() .
​ To learn more, see the sources I considered: [[1] Create Batch Call](https://docs.retellai.com/api-references/create-batch-call) [[2] Batch Calling, New Docs, and More Improvements!](https://www.retellai.com/changelog/batch-calling-new-docs-and-more-improvements) [[3] Monitor batch calls](https://docs.retellai.com/deploy/monitor-batch-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
h
@AI Evy Yes I know you have an API for this, but is there a way to build a custom function which will go find a number from a list through another services API and use that?
a
Thanks for the follow-up, @hhbuddy. I'll get back to you soon.
### Answer Yes, you can create custom functions that integrate with external APIs to retrieve phone numbers and other data [(1) ]() [(2) ]() . Custom functions allow you to extend your agent's capabilities by integrating external APIs, providing additional knowledge, or implementing custom logic . Here's how you can set up a custom function to retrieve numbers from another service's API: 1. Configure the custom function in your Retell AI dashboard [(1) ]() : - Add a unique name using underscores (e.g.,
get_phone_numbers
) - Provide a description of what the function does - Set the HTTP method (GET, POST, PATCH, PUT, or DELETE) [(1) ]() [(2) ]() - Add your external service's endpoint URL 2. Set up request parameters : - Define custom headers if needed for authentication - Set query parameters for your API call - Define parameters using JSON schema format for POST/PATCH/PUT requests 3. Handle the response : - Extract values from the API response and save them as dynamic variables - Use these variables later in the conversation or for subsequent API calls When Retell calls your custom function, it sends a request with this structure :
Copy code
json
{
  "call": {
    "call_type": "phone_call",
    "from_number": "+12137771234",
    "to_number": "+12137771235",
    "direction": "inbound",
    "call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
    "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
    "call_status": "registered",
    "metadata": {},
    "retell_llm_dynamic_variables": {
      "customer_name": "John Doe"
    },
    "opt_out_sensitive_data_storage": true
  },
  "name": "get_weather",
  "args": {
    "city": "New York"
  }
}
[(3) ]() Your endpoint can then make calls to external services (like Convoso) to retrieve phone numbers and return the data to Retell for further processing [(1) ]() [(2) ]() . The response can be in various formats (string, JSON object, etc.) and will be converted to string before sending to the LLM . For verification, you can check the
X-Retell-Signature
header to ensure requests are coming from Retell .
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[3] Discord message from @bimal.patel on 2024-11-17](https://discord.com/channels/1186424376300679209/1294891368505937952/1307604643517304842) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
h
@AI Evy Help me understand this better. You're saying to use the custom function feature within an AI Agent? So is the agent already on a call when we start it? Or is it in a pre-call state, that can find a number and then dial it?
a
Thanks for the follow-up, @hhbuddy. I'll get back to you soon.
### Answer Great question! Let me clarify how custom functions work in Retell AI's architecture. Custom functions operate during an active call, not in a pre-call state [(1) ]() [(2) ]() . When you set up a custom function, the AI agent calls it while already engaged in a conversation with a caller. Here's how the flow works: 1. **Call is already active**: The agent is on a live call with someone 2. **Agent decides to call function**: Based on the conversation context and your prompt instructions, the LLM decides to invoke your custom function 3. **Function executes**: Retell sends a request to your endpoint with call context and parameters 4. **Agent continues conversation**: The agent uses the function result to continue the conversation The key point is that custom functions are reactive tools during conversations, not proactive dialing mechanisms . For your use case of retrieving numbers from Convoso and dialing them, you'd need to: 1. Use external code (your own backend, Make.com, etc.) to call Convoso's API and get the phone numbers [(3) ]() 2. Use that same external system to call Retell's Create Batch Call API to initiate the calls 3. Optionally, configure custom functions within your agent to access additional data during those calls [(1) ]() [(2) ]() The custom functions are designed for real-time data retrieval and actions during active conversations, such as looking up customer information, booking appointments, or updating CRM records . They're not meant for initiating new calls.
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[3] Discord message from @noahreis on 2024-11-18](https://discord.com/channels/1186424376300679209/1294891368505937952/1308171340859183164) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
h
@AI Evy That's the answer I was looking for, thank you. So if I want to leverage existing auto dialers to determine who we will call auto-magically I'll need to to build my own custom app?
a
Thanks for the follow-up, @hhbuddy. I'll get back to you soon.
### Answer Yes, you'll need to build a custom integration solution to connect existing auto dialers with Retell AI's batch calling system [(1) ]() [(2) ]() . Here's what you'd need to build: 1. **Integration Layer**: A custom application that connects to your existing auto dialer's API to retrieve contact lists and dialing logic [(3) ]() 2. **Retell API Integration**: Code that takes the contact data and creates batch calls using Retell's API [(2) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const batchCallResponse = await client.batchCall.createBatchCall({
 from_number: '+14157774444',
 tasks: [{ to_number: '+12137774445' }],
}) ;
console.log(batchCallResponse.batch_call_id) ;
3. **Data Processing**: Logic to format your auto dialer's contact data into Retell's required structure with
tasks
arrays containing phone numbers and optional dynamic variables The community has noted that platforms like Make.com or n8n are commonly used for these types of integrations rather than Zapier, since there's no direct Zapier integration with Retell [(3) ]() . These platforms provide better control over API interactions and result handling . Your custom solution would essentially act as a bridge between your existing auto dialer's intelligence (who to call, when to call) and Retell AI's conversational capabilities (what to say, how to handle the conversation) [(1) ]() [(4) ]() .
​ To learn more, see the sources I considered: [[1] Streamline Calls with Retell AI’s Batch Dialer | Retell AI](https://www.retellai.com/blog/boost-operation-efficiency-with-retell-ais-batch-calling) [[2] Create Batch Call](https://docs.retellai.com/api-references/create-batch-call) [[3] Discord message from @towelie0976 on 2025-02-16](https://discord.com/channels/1186424376300679209/1294891368505937952/1340549337733660784) [[4] AI Dialer](https://www.retellai.com/glossary/ai-dialer) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
h
@AI Evy Interesting, so you're suggesting make.com? Is this a service that will allow me to build a bridge between services? I've always just built my own apps so if you could go into more detail on this I'd appreciate it.
a
Thanks for the follow-up, @hhbuddy. I'll get back to you soon.
### Answer Yes, Make.com is a no-code automation platform that can act as a bridge between services [(1) ]() . For your use case with existing auto dialers and Retell AI, Make.com offers powerful automation tools that can simplify the process of linking systems without extensive coding knowledge . Here's how Make.com works as a bridge: No-Code Integration Capabilities: - You can set up triggers to fetch data from your auto dialer system and push it to Retell AI in real-time - Create custom workflows that automate data integration between multiple platforms - Handle API calls, data formatting, and scheduling without writing custom code Alternative Integration Approaches: The documentation mentions several methods for connecting external systems to Retell AI: 1. No-code platforms like Make.com and n8n - These offer automation tools for creating workflows without extensive coding 2. Custom code solutions - Since you're experienced with building your own apps, you could create middleware to connect your auto dialer's API directly to Retell's batch calling API 3. Secure API gateways - These act as bridges for more complex integration scenarios, especially useful for on-premise systems For Your Specific Use Case: Given your experience building custom apps, you have two main paths: - **Custom Solution**: Build your own middleware that calls your auto dialer's API, processes the contact data, and creates batch calls using Retell's API [(2) ]() - **Make.com Integration**: Use Make.com to handle the data flow between your auto dialer and Retell AI, which could be faster to implement and maintain The choice depends on your preference for control versus speed of implementation. Make.com would get you up a
nd running faster, while a custom solution gives you complete control over the integration logic [(1) ]() .
​ To learn more, see the sources I considered: [[1] How to Connect Customer Data to Your Voice Bot | Retell AI](https://www.retellai.com/blog/how-to-connect-customer-data-into-your-voice-bot) [[2] Create Batch Call](https://docs.retellai.com/api-references/create-batch-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.