Skip to main content

https://actions.zapier.com/demo/

I am using Zapier AI Actions: Live Demo AI alpha to testing my Google Calendar Find Event function.

It returns 1 main result and 4 additional result.

It seems can not return more than 5 results.

If I have more than 5 events in one day, it seems can not give me my full day schedule.

May I know, is there any way to get full day schedule by using Google Calendar Find Event?

I am testing Zapier Action is because I am trying duplicating Google Calendar Assistant GPTs demonstrated on GPT keynote day. It seems always only return <= 5 result. 

I want to get a full day schedule for that. Is there way to get full fucntion..

 

 

Hi @yfJiang_080970 

We would need to see screenshots with how your custom action is configured to have full context.

 

Or you may need to explore using the GCal API via the API Request option:

 

https://developers.google.com/calendar/api/v3/reference/events/list

 

 


Hi Troy

 

My setting for Actions is just like picture.

 

 

I tried using test python code to directly using Google Calendar API as below and it successfully return numbers of events say 30.   

 

Python code:  

from datetime import datetime, timedelta

from google.oauth2.credentials import Credentials

from google_auth_oauthlib.flow import InstalledAppFlow

from google.auth.transport.requests import Request

from googleapiclient.discovery import build

import os.path

import pickle

 

# If modifying these SCOPES, delete the file token.pickle.

SCOPES = >'https://www.googleapis.com/auth/calendar.readonly']

 

def get_calendar_service():

    creds = None

    # The file token.pickle stores the user's access and refresh tokens.

    if os.path.exists('token.pickle'):

        with open('token.pickle', 'rb') as token:

            creds = pickle.load(token)

    # If there are no (valid) credentials available, let the user log in.

    if not creds or not creds.valid:

        if creds and creds.expired and creds.refresh_token:

            creds.refresh(Request())

        else:

            flow = InstalledAppFlow.from_client_secrets_file(

#                'credentials.json', SCOPES)

                'client_secret_1017705516251-htpji0uovipunfsnbp1vee1g06hh5feh.apps.googleusercontent.com.json', SCOPES)

            creds = flow.run_local_server(port=0)

        # Save the credentials for the next run

        with open('token.pickle', 'wb') as token:

            pickle.dump(creds, token)

 

    service = build('calendar', 'v3', credentials=creds)

    return service

 

def get_todays_events():

    service = get_calendar_service()

    # Call the Calendar API

    now = datetime.utcnow().isoformat() + 'Z'  # 'Z' indicates UTC time

    print('Getting the upcoming events')

    events_result = service.events().list(calendarId='primary', timeMin=now,

                                          maxResults=30, singleEvents=True,

                                          orderBy='startTime').execute()

    events = events_result.get('items', /]) 

 

    if not events:

        print('No upcoming events found.')

        return

 

    # Prints the start and name of the next 10 events

    for event in events:

        start = eventf'start'].get('dateTime', eventr'start'].get('date'))

        print(start, eventt'summary'])

 

if __name__ == '__main__':

    get_todays_events()


I’m experiencing the same thing, and it really makes the integration useless. If I have five events that all take place before 10 am, I cant even ask it for the events after 10 am because the find event action only finds the first five of the day.


Reply