pythongoogle-calendar-apigoogle-api-python-client

Can't create a monthly recurring google calendar event with python


I am using a python script to import calendar entries from one tool to google calendar. I have no problems with events that repeat weekly, but the monthly repeating events get created incorrectly.

I want to create a calendar event that happens on the first Wednesday of every month.

The event created either occurs only once or occurs weekly, even though the properties say some form of Monthly.

I have tried the following rules:

RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=WE
RRULE:FREQ=MONTHLY;BYDAY=WE;
RRULE:FREQ=MONTHLY;BYMONTHDAY=1;BYDAY=WE

I've been using https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.5 as a reference, along with other google search results, but nothing seems to let me create the event correctly. Any clues as to what I am missing?

The full event description:

    google_data = {
        'summary': event_data['summary'],
        'description': event_data['description'],
        'start': {
            'dateTime': event_data['start'],
            'timeZone': 'America/New_York',
        },
        'end': {
            'dateTime': event_data['end'],
            'timeZone': 'America/New_York',
        },
        'attendees': [event_data['attendees']],
        'location': event_data['location'],
        'recurrence': [rrules], }

Solution

  • Upon replicating your issue, I first tested it using the Google Calendar UI and investigated the recurrence settings. The following rule worked as expected and correctly scheduled the event on the first Wednesday of every month.

    Try this frequency rule:

        "RRULE:FREQ=MONTHLY;BYDAY=1WE"
    

    Code:

    {
      "summary": "First Wednesday",
      "start": {
        "dateTime": "2025-06-04T10:00:00-04:00",
        "timeZone": "America/New_York"
      },
      "end": {
        "dateTime": "2025-06-04T11:00:00-04:00",
        "timeZone": "America/New_York"
      },
      "recurrence": [
        "RRULE:FREQ=MONTHLY;BYDAY=1WE"
      ]
    }
    

    Sample Output:

    enter image description here

    Reference/s: Recurring events , Events:insert