https://retellai.com/?utm_source=discord&utm_medium=seo logo
how do i give the agent the current time and timez...
# ❓・ai-evy-support
c
@AI Evy how do i give the agent the current time and timezone?
a
Thanks for tagging me @cristi. I'll look through relevant sources and get back to you shortly.
### Answer Retell AI provides built-in system variables for current time and timezone [(1) ]() . Use
{{current_time}}
for the current time in America/Los_Angeles (PST/PDT) [(1) ]() [(2) ]() . For other timezones, use
{{current_time_[timezone]}}
. For example: -
{{current_time_Australia/Sydney}}
-
{{current_time_America/New_York}}
Add these dynamic variables directly in your agent's prompt [(3) ]() . For example:
Copy code
#context 
current date: {{current_time_America/New_York}}
The system will automatically inject the current time when the agent runs [(1) ]() .
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[3] Discord message from @tirath. on 2025-10-30](https://discord.com/channels/1186424376300679209/1186462578310910112/1433537153069219930) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @cristi. I'll get back to you soon.
c
@AI Evy when booking the appointment, can i have the agent set a custom title to the appointment? i want it to pass the customer's name and address and for those to get pushed into google calendar
a
​ To learn more, see the sources I considered: [[1] calendar appointment booking through retell](https://discord.com/channels/1186424376300679209/1250814023067500657) [[2] Personalization with Google Sheets](

https://www.youtube.com/watch?v=A9H3a33gM2M▾

) ​
### Answer The built-in Cal.com booking function in Retell AI has limited functionality [(1) ]() . To customize appointment details like title, customer name, and address when booking to Google Calendar, you'll need to use a custom function instead of the built-in Cal.com integration . The built-in function doesn't support passing additional information such as notes, custom titles, or other metadata to the calendar booking . To achieve what you're looking for, you can integrate Google Calendar directly using a custom function with the Google API . This approach allows you to pass custom data like customer name and address to populate the appointment title and description in Google Calendar [(2) ](

▾

) . Check out these potentially useful sources: - [Book Calendar]() - [calendar appointment booking through retell]() Would you like guidance on setting up a custom function for Google Calendar integration?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy what are the advantages and disadvantages of using a predetermined function like the one built in for cal.com versus custom one?
a
Thanks for the follow-up, @cristi. I'll get back to you soon.
### Answer Based on the available sources, here are the key differences between pre-built Cal.com functions and custom functions in Retell AI: ### Pre-built Cal.com Functions Advantages: - Quick setup - Simply enter your Cal.com API key and Event Type ID to get started [(1) ]() [(2) ]() - No coding required - Ready-to-use "Check Availability" and "Book Appointments" functions [(3) ]() [(4) ]() - Seamless integration - Native connection to Cal.com with minimal configuration [(2) ]() - Time-saving - Can save thousands of hours of development time Disadvantages: - Limited customization - Cannot pass additional metadata like custom titles, customer names, or addresses to the booking [(5) ]() - Fixed functionality - Works only with Cal.com's standard booking flow [(1) ]() - Less flexibility - Cannot modify appointment details or add custom fields beyond basic booking parameters ### Custom Functions Advantages: - Full control - Define any input structure and customize all aspects of the booking [(3) ]() - Flexible integration - Connect to any API including Google Calendar, Calendly, or custom systems - Custom data handling - Pass customer names, addresses, notes, and other metadata - Business logic - Validate data, calculate prices, check inventory, or execute complex workflows Disadvantages: - Requires development - Need to build
and maintain the integration yourself - More setup time - Takes longer to configure compared to pre-built functions - Technical expertise needed - Requires understanding of APIs and webhooks For your use case of passing customer name and address to Google Calendar with a custom title, a custom function would be the better choice since the pre-built Cal.com function doesn't support this level of customization .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Book Calendar](https://docs.retellai.com/build/book-calendar) [[2] AI Scheduling Assistant with Cal.com | Retell AI](https://www.retellai.com/blog/cal-coms-preset-tools) [[3] Function Calling Overview](https://docs.retellai.com/build/single-multi-prompt/function-calling) [[4] AI Appointment Scheduling with Voice AI Booking Assistant](https://www.retellai.com/features/book-appointments) [[5] Discord message from @gorilla4356 on 2025-04-12](https://discord.com/channels/1186424376300679209/1186462578310910112/1360734305722040501) ​
c
@AI Evy can you guide me through doing that?
a
Thanks for the follow-up, @cristi. I'll get back to you soon.
### Answer Based on the available sources, I can guide you through setting up a custom function to book appointments with Google Calendar in Retell AI. ### Steps to Create a Custom Function [(1) ]() 1. Configure Function Details Add a name and description for your custom function. The name should be unique and separated with underscores . For example: - Name:
book_google_calendar_appointment
- Description:
Book appointment to Google Calendar with customer name and address
2. Select HTTP Method Choose the HTTP method (GET, POST, PUT, PATCH, or DELETE) that Retell will use to send the request to your endpoint . For Google Calendar API, you'll typically use POST . 3. Add Endpoint URL Add the URL where Retell will send the request to execute your custom function. This has to be a valid URL . For Google Calendar, this would be your backend endpoint that interfaces with the Google Calendar API . *4. Set Request Headers (Optional) * You can define custom headers to include with the request Retell sends to your endpoint. Header values can be static or include dynamic variables . *5. Set Query Parameters (Optional) * You can define query parameters to include in the request URL that Retell appends to your endpoint. Query parameter values can be static or include dynamic variables . 6. Define Parameters Define the parameters for the custom function using JSON schema format or JSON form. Only available for POST, PATCH and PUT requests . Example parameter schema:
Copy code
json
{
 "type": "object",
 "properties": {
 "customer_name": {
 "type": "string",
 "description": "The customer's full name"
 },
 "customer_address": {
 "type": "string",
 "description": "The customer's address"
 },
 "appointment_time": {
 "type": "string",
 "description": "The appointment date and time"
 }
 },
 "required": [
 "customer_name",
 "customer_address",
 "appointment_time"
 ]
}
*7. Set Response Variables (Optional) * Extract values from the API response and save them as dynamic variables for use later in the conversation . For example, you can extract a confirmation ID from the response and reference it later using
{{confirmation_id}}
. ### Request & Response Specification Retell will send the request to your endpoint with the following: - **Header**:
X-Retell-Signature
for security verification and
Content-Type: application/json
- Body (JSON format) : Contains
name
(function name) ,
call
(call object with context) , and
args
(function arguments as JSON object) The request will timeout in your specified timeout period, or 2 minutes if not specified . Response should have a status code between 200-299 to indicate success . The function result is capped at 15,000 characters . ### Additional Resources For more guidance on setting up custom functions, check out: - [Personalization with Google Sheets](

▾

) [(2) ](

▾

) - [Custom Function Documentation]() [(1) ]() Would you like help with a specific part of the setup, such as the parameter schema or connecting to the Google Calendar API?
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Personalization with Google Sheets](

https://www.youtube.com/watch?v=A9H3a33gM2M▾

) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy using the base functions, can i somehow pass the created eventID via webhook to n8n or something?
a
Thanks for the follow-up, @cristi. I'll get back to you soon.
tell-ai-webhooks-feature) - [Webhook]() Would you like guidance on configuring the webhook endpoint in your Retell AI dashboard?
### Answer ### Answer Yes, you can pass data from Retell AI to n8n using webhooks [(1) ]() [(2) ]() . Webhooks allow you to push real-time call data to any connected system the moment an event occurs [(1) ]() . How Webhooks Work: When a specific event happens (like a call ending or an appointment being booked) , Retell AI can trigger a webhook to notify another application and pass along relevant data [(2) ]() . The webhook sends a structured HTTP request (usually in JSON format) to a predefined URL [(1) ]() . Key Capabilities: - Instant Data Syncing – Pushes real-time call data to any connected system - Update CRMs with contact details or call summaries [(2) ]() - Push data into analytics dashboards or ticketing systems - Initiate custom workflows across platforms like Zapier, Make, or n8n Webhook Setup Process: 1. Define an Event - Choose when the webhook should trigger (e.g., when a call ends or a booking is made) 2. Configure a Destination URL - Point the webhook to n8n or your backend server 3. Send Structured Data - When the event happens, the AI agent sends JSON-formatted data to the webhook endpoint 4. Trigger an Action - The receiving system (n8n) uses that data to take action For passing booking event IDs specifically, you would configure your webhook to capture the call data when the booking function completes, and n8n would receive that structured data including the event ID. Check out these potentially useful sources: - [Retell AI Webhooks | AI Voice Agents With Live Data](
​ To learn more, see the sources I considered: [[1] Retell AI Webhooks | AI Voice Agents With Live Data | Retell AI](https://www.retellai.com/blog/retell-ai-webhooks-feature) [[2] Webhook](https://www.retellai.com/glossary/webhook) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy with the basic function can i pass certain parameters to cal.com like name, address, phone number? that then cal.com uses in certain fields or notes
a
Thanks for the follow-up, @cristi. I'll get back to you soon.
### Answer Based on the available sources, the built-in Cal.com preset functions have limited functionality and do not support passing additional custom parameters like customer name, address, or phone number to populate Cal.com's custom fields or notes [(1) ]() . The pre-built Cal.com functions only support basic parameters like API key, Event Type ID, and timezone [(2) ]() . They are designed for quick setup with minimal configuration but lack the flexibility to pass custom metadata [(1) ]() . What the basic Cal.com functions provide: - Check calendar availability [(3) ]() - Book appointments with standard Cal.com fields [(3) ]() [(4) ]() - Simple integration requiring just Cal.com API key and Event Type ID [(2) ]() What they don't support: - Passing custom parameters like name, address, or phone number to Cal.com custom fields - Adding notes or metadata to bookings - Customizing appointment titles or descriptions To pass custom parameters like customer name, address, and phone number to Cal.com fields or notes, you would need to create a custom function instead [(5) ]() . Custom functions allow you to define your own parameter schema and control exactly what data gets sent to Cal.com's API, giving you the flexibility to populate custom fields and notes as needed [(5) ](
ersation-flow/custom-function) [(6) ]() . Would you like guidance on setting up a custom function to pass these specific parameters to Cal.com?
​ To learn more, see the sources I considered: [[1] Discord message from @jarek_88513 on 2025-05-27](https://discord.com/channels/1186424376300679209/1294891368505937952/1376949535246651462) [[2] cal.com](https://discord.com/channels/1186424376300679209/1329169860055531581) [[3] AI Scheduling Assistant with Cal.com | Retell AI](https://www.retellai.com/blog/cal-coms-preset-tools) [[4] Function Calling Overview](https://docs.retellai.com/build/single-multi-prompt/function-calling) [[5] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[6] Integrate Function Calling](https://docs.retellai.com/integrate-llm/integrate-function-calling) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy why do i get the error could not publish agent
a
Thanks for the follow-up, @cristi. I'll get back to you soon.
### Answer ### Answer When you encounter a "could not publish agent" error, several factors could be causing the issue [(1) ]() . Common causes: 1. TTS Provider Issues - If you're using a deprecated TTS provider like Play TTS, you'll see a sunsetting warning that can block publishing . Switch to a supported TTS provider (Retell's native voices or another supported option) and configure fallback voices . 2. Transfer Phone Number Problems - If your agent has a transfer step and that phone number is down or unreachable, Retell may treat the agent as broken or incomplete, preventing publication . 3. WebSocket/Webhook Configuration - Ensure your endpoint is reachable and using the correct URL format (
wss://
or
ws://
with no trailing slash) . 4. Audio Streaming Issues - Verify your endpoint is streaming audio properly, as Retell requires real-time audio . Troubleshooting steps: - Check if you deployed the latest draft (go to Deployment tab and publish) - Test your WebSocket/Webhook with Postman to verify reachability - Review call logs for transfer failures or disconnects - Use the Debug tool in the Playground to catch logic or flow issues - After updating any settings (especially TTS) , re-publish your agent If the platform shows no known health issues blocking agent publishing , the error is likely configuration-related. Check your TTS settings and any transfer phone numbers first, as these are common blockers .
​ To learn more, see the sources I considered: [[1] Error Publishing Agent](https://discord.com/channels/1186424376300679209/1387459559404208208) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.