You want to generate an ICalendar RRULE string directly inside a Notion database so that exported events repeat correctly in calendar apps like Google Calendar or Outlook. Notion formulas can construct text strings but have no native RRULE builder. This article shows how to combine Notion properties and formula functions to output a valid recurrence rule string.
An RRULE defines how often an event repeats: daily, weekly, monthly, or yearly, with optional end conditions. By building the rule in a formula, you can automate event exports from Notion without manual editing. You will learn the exact formula syntax for each recurrence frequency and how to handle common edge cases.
After reading, you will be able to create a Notion database that outputs a ready-to-use RRULE for any custom schedule. The formula uses properties for frequency, interval, and end date. You can copy the code blocks directly into your Notion formula field.
Key Takeaways: Building Notion RRULE Formulas
- Formula property with concat and if functions: Combines static RRULE parts with dynamic property values for frequency, interval, and end date.
- Select property for frequency: Use a select property with options Daily, Weekly, Monthly, Yearly to control the RRULE FREQ part.
- Date property for end date: A date property named “End Date” supplies the UNTIL value formatted as YYYYMMDDTHHMMSS.
How Notion Formulas Generate RRULE Strings
An ICalendar RRULE is a plain text string that starts with “RRULE:” followed by key-value pairs separated by semicolons. The required pair is FREQ, which can be DAILY, WEEKLY, MONTHLY, or YEARLY. Optional pairs include INTERVAL (default 1), UNTIL (end date and time in UTC), COUNT (number of occurrences), and BYDAY (days of the week).
Notion formulas can process numbers, dates, and text using functions like concat, if, formatDate, and replace. To build an RRULE, you need at least three database properties:
- Frequency (Select): Options Daily, Weekly, Monthly, Yearly
- Interval (Number): How many units between recurrences, for example 2 for every other week
- End Date (Date): When the recurrence stops
The formula combines these values into a single text output. You can also add a BYDAY property for weekly rules that repeat on specific weekdays. The formula must handle cases where optional properties are empty, for example when the interval is 1 or no end date is set.
Formula for Daily, Weekly, Monthly, and Yearly RRULEs
The following formulas assume your database has these property names exactly: Frequency (Select), Interval (Number), End Date (Date), and optionally Days (Multi-select with weekday options like Mon, Tue, Wed).
Basic RRULE with Frequency, Interval, and End Date
This formula generates an RRULE that ends on a specific date. It uses formatDate to convert the End Date into the UTC format required by the standard: YYYYMMDDTHHMMSSZ.
- Create the formula property
Add a new Formula property to your database and name it “RRULE”. - Enter the formula
Paste this code into the formula editor:concat("RRULE:FREQ=", prop("Frequency"), ";INTERVAL=", if(empty(prop("Interval")), "1", format(prop("Interval"))), if(empty(prop("End Date")), "", concat(";UNTIL=", replaceAll(replaceAll(formatDate(prop("End Date"), "YYYYMMDDTHHmmss"), " ", "T"), "-|:", ""), "Z"))) - Test with sample data
Set Frequency to “WEEKLY”, Interval to 2, and End Date to a future date. The formula should output something likeRRULE:FREQ=WEEKLY;INTERVAL=2;UNTIL=20251231T235959Z.
Adding BYDAY for Weekly Recurrence on Specific Weekdays
If you have a Multi-select property named Days with weekday options, you can append a BYDAY part. The formula converts the selected days to the standard two-letter codes (MO, TU, WE, TH, FR, SA, SU).
- Add a Days property
Create a Multi-select property named “Days” and add all seven weekday options as select values. - Update the RRULE formula
Replace the formula above with this version that includes BYDAY:let( daysList, map(prop("Days"), current, if(current == "Mon", "MO", if(current == "Tue", "TU", if(current == "Wed", "WE", if(current == "Thu", "TH", if(current == "Fri", "FR", if(current == "Sat", "SA", if(current == "Sun", "SU", "")))))))), daysStr, if(empty(daysList), "", concat(";BYDAY=", join(daysList, ","))), concat("RRULE:FREQ=", prop("Frequency"), ";INTERVAL=", if(empty(prop("Interval")), "1", format(prop("Interval"))), daysStr, if(empty(prop("End Date")), "", concat(";UNTIL=", replaceAll(replaceAll(formatDate(prop("End Date"), "YYYYMMDDTHHmmss"), " ", "T"), "-|:", ""), "Z"))) ) - Select days for a weekly event
For a meeting every Monday and Wednesday, select Mon and Wed in the Days property. The formula will outputRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE;UNTIL=20251231T235959Z.
If Notion Still Has Issues After the Main Fix
Formula Returns “RRULE:FREQ=” with No Frequency
This happens when the Frequency property is empty or contains a value that does not match the expected options. Open the Frequency property and ensure it is a Select type, not a Text type. The formula expects exact strings like “DAILY” or “WEEKLY”. If the property is empty, the formula outputs an incomplete rule. Add a default value by wrapping the Frequency in an if statement: if(empty(prop("Frequency")), "DAILY", prop("Frequency")).
UNTIL Date Format Is Wrong
The UNTIL value must be in UTC format without hyphens or colons. If you see something like UNTIL=2025-12-31T23:59:59, the replaceAll function did not remove the dashes. Check that the format string in formatDate uses YYYYMMDDTHHmmss with uppercase letters for year, month, day, hour, minute, and second. The replaceAll call removes hyphens and colons. If the format includes a space between date and time, the replaceAll also removes spaces.
BYDAY Values Not Appearing
If the Days property is empty or the weekday names do not match the if conditions, the BYDAY part will be blank. Verify that the Multi-select options are exactly “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, “Sat”, “Sun” with the first letter capitalized. The formula is case-sensitive. Alternatively, use a formula that converts any text to uppercase with upper.
| Component | Description | Example |
|---|---|---|
| FREQ | Recurrence frequency from the Frequency property | WEEKLY |
| INTERVAL | Number of units between recurrences | 2 |
| BYDAY | Weekday codes from the Days property | MO,WE |
| UNTIL | End date and time in UTC format | 20251231T235959Z |
The table above shows the four main RRULE components your formula can generate. Each component is optional except FREQ. If you omit INTERVAL, the default is 1. If you omit UNTIL, the recurrence never ends. Always test the output string in an ICalendar validator or by importing into a calendar app.
You can now generate a complete ICalendar recurrence rule from your Notion database using formulas. The key is to structure your properties correctly and use concat and if to handle optional values. For advanced schedules, add a COUNT property and include it in the formula with concat(";COUNT=", format(prop("Count"))). This approach saves time when exporting events to other calendar systems.