google_calendar_tool additional parameters
# support
b
How do I added attendees and a locations such as a google meet link?
v
Based on the information I've found, I can provide some guidance on adding attendees and a Google Meet link to your
google_calendar_tool
, though I'd like to clarify a few details to give you more specific instructions. For adding a Google Meet link, it appears you can set up a virtual meeting by using these parameters: - Set
"type": "virtual"
- Set
"location": "virtual"
- Include
"description": "Google meet call - not in person"
For attendees, I found that "attendee name" is mentioned as a necessary parameter when scheduling appointments, but I don't have the exact format for adding multiple attendees. Could you share what you've tried so far with the
google_calendar_tool
configuration? Also, are you trying to add multiple attendees or just one? This would help me provide more targeted assistance. Sources: - [Virtual Events with Google Meet Links](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333753317490294836) - [Attendee Name as a Parameter](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336345690393149452)
b
ok how do i add this to the vapi Parameters?
m
It wouldn't be added to the VAPI parameters. Whenever you pass the fields you collect from your call (like day, time, email address using the tool through your API endpoint, you need to have it setup so that when you create the event you auto generate a google meet link. That's how I've done it to build fastresponse.ai
b
How are attendess added?
m
I ask for the email address on the call and pass that using VAPI to my endpoint, capture that to submit my create event call to Google API
v
checking if this is resolved/solved for you?
b
@Shubham Bajaj no I dont see a way to add attendees
s
@B2 TheW To add attendees to your calendar event, you need to include an
attendees
array in your event data. Each attendee should be an object with at least the
email
property:
Copy code
javascript
"attendees": [
  {
    "email": "attendee1@example.com",
    "responseStatus": "needsAction"
  },
  {
    "email": "attendee2@example.com",
    "responseStatus": "needsAction"
  }
]
The
responseStatus
is required and typically set to
"needsAction"
for new invitations. ## 2. Adding Google Meet Integration To automatically generate a Google Meet link for your event, you need to: 1. Add a
conferenceData
object with a
createRequest
2. Include the
conferenceDataVersion
parameter set to
1
Here's how to set up the conferenceData object:
Copy code
javascript
"conferenceData": {
  "createRequest": {
    "requestId": "some-unique-id", // Generate a unique ID for each request
    "conferenceSolutionKey": {
      "type": "hangoutsMeet"
    }
  }
}
## 3. Complete Event Object Example Here's a complete example of how your calendar event object should look with both attendees and Google Meet integration:
Copy code
javascript
{
  "summary": "Meeting Title",
  "description": "Meeting description",
  "start": {
    "dateTime": "2024-05-30T10:00:00-07:00",
    "timeZone": "America/Los_Angeles"
  },
  "end": {
    "dateTime": "2024-05-30T11:00:00-07:00",
    "timeZone": "America/Los_Angeles"
  },
  "attendees": [
    {
      "email": "attendee1@example.com",
      "responseStatus": "needsAction"
    },
    {
      "email": "attendee2@example.com",
      "responseStatus": "needsAction"
    }
  ],
  "conferenceData": {
    "createRequest": {
      "requestId": "meeting-123456", // Use a unique ID for each meeting
      "conferenceSolutionKey": {
        "type": "hangoutsMeet"
      }
    }
  }
}
## 4. Important Notes and Requirements 1. **conferenceDataVersion parameter**: When calling the Google Calendar API, you must include the
conferenceDataVersion=1
parameter. This is crucial for the Google Meet link to be generated. 2. **Google Workspace subscription**: Creating Google Meet links programmatically typically requires an active Google Workspace subscription. 3. **Auth scope requirements**: Ensure your OAuth scope includes
https://www.googleapis.com/auth/calendar
for full access or
https://www.googleapis.com/auth/calendar.events
for event management only. 4. **Permissions**: The account making the API calls must have permissions to create events and conferencing data in the specified calendar. 5. **Unique requestId**: Always generate a new, unique
requestId
for each request to avoid duplicates. ## 5. Implementation in Your Application When implementing this in your application that uses the Vapi google_calendar_tool: 1. Collect the email addresses of attendees from your users 2. Generate a unique ID for the conference request 3. Include these parameters in your calendar event creation call 4. Make sure to include the
conferenceDataVersion=1
parameter After the event is created, the
hangoutLink
field in the response will contain the Google Meet URL that you can share with participants.
@Mistermanu#000 Correct me if I am wrong here.
m
That looks about right. I do it a bit differently because I'm creating the event object first and then dispatch either to Outlook or Google calendar so mine looks like that: `// Prepare event data (common for both providers) const eventData = { summary, description, location, start, end, attendees: attendees.map((email: string) => ({ email })), }; // Handle based on provider if (integration.provider === 'google') { // Google Calendar integration return await handleGoogleCalendarEvent( integration, eventData, calendarId || 'primary', body.conferenceData, supabase ); } else if (integration.provider === 'outlook') { // Outlook Calendar integration return await handleOutlookCalendarEvent( integration, eventData, calendarId || 'primary', supabase ); } else { return NextResponse.json({ error:
Unsupported calendar provider: ${integration.provider}
}, { status: 400 }); } } catch (error) { console.error('Unexpected error in add-event route:', error); return NextResponse.json({ error:
Failed to add event: ${String(error)}
}, { status: 500 }); }` Then I do some authentication or token refresh if need be and pass the event info to Google's API:
Copy code
const calendar = google.calendar({ version: 'v3', auth: oauth2Client });

    // Add Google-specific properties
    const event = {
      ...eventData,
      conferenceData,
    };

    try {
      // Insert the event
      const response = await calendar.events.insert({
        calendarId,
        requestBody: event,
        sendUpdates: 'all', // Send email notifications to attendees
        conferenceDataVersion: conferenceData ? 1 : 0, // Enable Google Meet integration if requested
      });

      return NextResponse.json({
        success: true,
        event: response.data
      });
b
Thanks guys ill try this next few days
v
Marking this ticket as Solved ✅
b
SO i dont see any way to edit the reqest body
v
Hey, could you brief me on what exactly you're trying to get done and what steps or actions you've taken until now to resolve it? This will help me understand your use case and what you've done until now. It'll give me an overview, and then I can craft a solution that actually works for you.
b
Google calendar dose not add attendees, nor a google meeting link. I just books the host i did have some luck with the new MCP protocol tools, but that still didnt add a location.
Also, i cant make any edits to the google_calendar_tool request body or make any changes to it at all per that screenshot
Ok i got a working solution with a combination of Zapier and MCP tools
v
Marking this ticket as Solved ✅
2 Views