0

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], }
3
  • 'recurrence': [rrules] This is not helpful, because we have no idea what the variable rrules actually contains. And the same for event_data. Can you show us the actual values of those variables? Commented May 15 at 2:04
  • rrules is one of the 3 varieties listed above. As for values, no, I can't share those. The data works if rrules = 'RRULE:FREQ=WEEKLY' with all other values the same, but fails as soon as I try to make it monthly on the first wednesday of the month. with rrules = 'RRULE:FREQ=MONTHLY' makes it recurring on the day of the month, for example the 4 of every month. Commented May 15 at 2:34
  • Without sharing example data that would allow us to replicate your issue, it's hard to say - but I would want to check that event_data['start'] is in fact a Wednesday, because if it isn't, this issue may occur. You don't need to show us all your actual data, but surely you can come up with example values of event_data that would cause the issue - but shouldn't, according to you? Commented May 15 at 4:10

2 Answers 2

0

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

Sign up to request clarification or add additional context in comments.

1 Comment

That did it. I didn't see that BYDAY syntax in the google docs (I couldn't find a list of the available options and their acceptable values except for the datatracker site).
0

To create a monthly recurring event on the first Wednesday using the Google Calendar API, the correct recurrence rule (RRULE) should be FREQ=MONTHLY;BYDAY=1WE, where 1WE explicitly indicates the first Wednesday of each month. Your previous attempts either omitted the ordinal indicator (1) or used conflicting parameters like BYMONTHDAY, which may cause the rule to be misinterpreted. The recurrence rule must be passed exactly in the format ['RRULE:FREQ=MONTHLY;BYDAY=1WE'] within the recurrence field of the event definition. This ensures that the API understands the instruction to place the event on the first Wednesday monthly, avoiding unintended weekly patterns or single occurrences.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.