Calendars and contacts
Create and read iCalendar events (.ics), expand recurring events, and create and read vCard contacts (.vcf). Typical uses: send a meeting invitation file, import contacts from a phone or mail program.
ics createics createics writeics writeics parseics parsevcard createvcard createvcard parseics expandics expand

ics create <json_events>


Description

    Create an iCalendar text. An event: start (required), end, all_day, timezone, summary, description, location, url, status, uid (by default a hash of the event: the same event always has the same UID), dtstamp, organizer (an email or {email, name}), attendees (emails or {email, name, role, partstat, rsvp}), rrule (FREQ=...), alarm_minutes_before (or alarms: [{minutes_before}]), other (see ics parse). DTSTAMP is the current UTC time without params.now

Parameters

    json_events:   The events: JSON array, or one object - String - required
admin
json load "tuto_ev" (ics parse (ics create "{\"uid\": \"a@example.com\", \"summary\": \"Point\", \"start\": \"2026-11-16\"}")); -> "[res]" (json select "tuto_ev" "/[0]/summary"); json unload "tuto_ev"; [res]
mentdb
Point

ics create <json_events> <json_params>


Description

    Create an iCalendar text with parameters: prodid, calendar_name (NAME and X-WR-CALNAME), method (PUBLISH, REQUEST...), timezone (for the local date-times of the events), now (DTSTAMP, for fixed results)

Parameters

    json_events:   The events - String - required
    json_params:   The parameters - String - required
admin
ics create "[{\"uid\": \"kickoff@example.com\", \"summary\": \"Kick-off, projet ETL\", \"description\": \"Salle 2; apporter le plan\", \"location\": \"Saint-Denis\", \"start\": \"2026-11-16T09:00:00\", \"end\": \"2026-11-16T10:30:00\", \"timezone\": \"Indian/Reunion\", \"organizer\": {\"email\": \"chef@example.com\", \"name\": \"La Cheffe\"}, \"attendees\": [\"a@example.com\", {\"email\": \"b@example.com\", \"name\": \"Bob\", \"role\": \"REQ-PARTICIPANT\", \"rsvp\": true}], \"url\": \"https://example.com/kickoff\", \"rrule\": \"FREQ=WEEKLY;BYDAY=MO;COUNT=4\", \"alarm_minutes_before\": 15}]" "{\"now\": \"2026-11-04T08:00:00Z\"}"
mentdb
BEGIN:VCALENDAR VERSION:2.0 PRODID:-//MentDB//MQL//EN CALSCALE:GREGORIAN BEGIN:VTIMEZONE TZID:Indian/Reunion BEGIN:STANDARD DTSTART:19700101T000000 TZOFFSETFROM:+0400 TZOFFSETTO:+0400 END:STANDARD END:VTIMEZONE BEGIN:VEVENT UID:kickoff@example.com DTSTAMP:20261104T080000Z DTSTART;TZID=Indian/Reunion:20261116T090000 DTEND;TZID=Indian/Reunion:20261116T103000 SUMMARY:Kick-off\, projet ETL DESCRIPTION:Salle 2\; apporter le plan LOCATION:Saint-Denis URL:https://example.com/kickoff ORGANIZER;CN="La Cheffe":mailto:chef@example.com ATTENDEE:mailto:a@example.com ATTENDEE;CN="Bob";ROLE=REQ-PARTICIPANT;RSVP=TRUE:mailto:b@example.com RRULE:FREQ=WEEKLY;BYDAY=MO;COUNT=4 BEGIN:VALARM ACTION:DISPLAY DESCRIPTION:Kick-off\, projet ETL TRIGGER:-PT15M END:VALARM END:VEVENT END:VCALENDAR
An all-day event and a UTC event in a named calendar
admin
ics create "[{\"summary\": \"Noel\", \"start\": \"2026-12-25\", \"end\": \"2026-12-26\"}, {\"summary\": \"Audit\", \"start\": \"2026-12-01T08:00:00Z\", \"end\": \"2026-12-01T09:00:00Z\"}]" "{\"now\": \"2026-11-04T08:00:00Z\", \"calendar_name\": \"Agenda\", \"method\": \"PUBLISH\"}"
mentdb
BEGIN:VCALENDAR VERSION:2.0 PRODID:-//MentDB//MQL//EN CALSCALE:GREGORIAN METHOD:PUBLISH NAME:Agenda X-WR-CALNAME:Agenda BEGIN:VEVENT UID:d6444bfe8c9beab7e8359772d10f4702@mentdb DTSTAMP:20261104T080000Z DTSTART;VALUE=DATE:20261225 DTEND;VALUE=DATE:20261226 SUMMARY:Noel END:VEVENT BEGIN:VEVENT UID:b617d17397bb9ebc24b8138c4630ba29@mentdb DTSTAMP:20261104T080000Z DTSTART:20261201T080000Z DTEND:20261201T090000Z SUMMARY:Audit END:VEVENT END:VCALENDAR
Used in use cases (1 recipe)

    Integrator & ETL developer › Send an appointment and a contact that open in every calendar and phone
Often used with

    file delete  ·  file exist  ·  file mkdir  ·  ics parse  ·  qr create  ·  qr read  ·  string contains  ·  vcard create

ics write <json_events> <out_path>


Description

    Write an iCalendar file (UTF-8, the folder must exist): {file, bytes, events}

Parameters

    json_events:   The events - String - required
    out_path:   The file to write - String - required
admin
if (equal (file exist "tmp") "0") {file mkdir "tmp";}; ics write "[{\"summary\": \"Noel\", \"start\": \"2026-12-25\", \"end\": \"2026-12-26\"}, {\"summary\": \"Audit\", \"start\": \"2026-12-01T08:00:00Z\", \"end\": \"2026-12-01T09:00:00Z\"}]" "tmp/tuto_etl_cal.ics"; json load "tuto_ev" (ics parse "tmp/tuto_etl_cal.ics"); -> "[res]" (json select "tuto_ev" "/[0]/summary"); json unload "tuto_ev"; file delete "tmp/tuto_etl_cal.ics"; [res]
mentdb
Noel

ics write <json_events> <out_path> <json_params>


Description

    Write an iCalendar file with the parameters of ics create

Parameters

    json_events:   The events - String - required
    out_path:   The file to write - String - required
    json_params:   The parameters - String - required
admin
if (equal (file exist "tmp") "0") {file mkdir "tmp";}; -> "[res]" (ics write "[{\"summary\": \"Noel\", \"start\": \"2026-12-25\", \"end\": \"2026-12-26\"}, {\"summary\": \"Audit\", \"start\": \"2026-12-01T08:00:00Z\", \"end\": \"2026-12-01T09:00:00Z\"}]" "tmp/tuto_etl_cal.ics" "{\"now\": \"2026-11-04T08:00:00Z\"}"); file delete "tmp/tuto_etl_cal.ics"; [res]
mentdb
{"file": "tmp/tuto_etl_cal.ics", "bytes": 421, "events": 2}

ics parse <text_or_path>


Description

    Read iCalendar events from a text or a file: JSON array of {uid, summary, description, location, url, status, dtstamp, start, end, all_day, tzid, end_tzid, rrule, organizer, organizer_name, attendees, alarm_minutes_before, alarms, other}, only the fields present (all_day always with start). The dates are written as ISO dates. Long lines are unfolded and texts unescaped. Its result can be given to ics create

Parameters

    text_or_path:   The text, starting with BEGIN:VCALENDAR, or a file path - String - required
admin
ics parse "BEGIN:VCALENDAR VERSION:2.0 BEGIN:VEVENT UID:42@example.com SUMMARY:Point d'avancement DTSTART;TZID=Europe/Paris:20261116T140000 DTEND;TZID=Europe/Paris:20261116T150000 RRULE:FREQ=WEEKLY;COUNT=3 ATTENDEE;CN=Ana:mailto:ana@example.com BEGIN:VALARM TRIGGER:-PT1H ACTION:DISPLAY END:VALARM END:VEVENT BEGIN:VEVENT UID:43@example.com SUMMARY:Ferie DTSTART;VALUE=DATE:20261225 END:VEVENT END:VCALENDAR"
mentdb
[{"uid": "42@example.com", "summary": "Point d'avancement", "start": "2026-11-16T14:00:00", "all_day": false, "tzid": "Europe/Paris", "end": "2026-11-16T15:00:00", "rrule": "FREQ=WEEKLY;COUNT=3", "attendees": [{"email": "ana@example.com", "name": "Ana"}], "alarm_minutes_before": 60, "alarms": [{"trigger": "-PT1H", "action": "DISPLAY", "minutes_before": 60}]}, {"uid": "43@example.com", "summary": "Ferie", "start": "2026-12-25", "all_day": true}]

ics parse <text_or_path> <json_params>


Description

    Read iCalendar events with parameters: max_events (100000), max_bytes (32 MB)

Parameters

    text_or_path:   The text or the file path - String - required
    json_params:   The parameters - String - required
admin
ics parse "BEGIN:VCALENDAR VERSION:2.0 BEGIN:VEVENT UID:42@example.com SUMMARY:Point d'avancement DTSTART;TZID=Europe/Paris:20261116T140000 DTEND;TZID=Europe/Paris:20261116T150000 RRULE:FREQ=WEEKLY;COUNT=3 ATTENDEE;CN=Ana:mailto:ana@example.com BEGIN:VALARM TRIGGER:-PT1H ACTION:DISPLAY END:VALARM END:VEVENT BEGIN:VEVENT UID:43@example.com SUMMARY:Ferie DTSTART;VALUE=DATE:20261225 END:VEVENT END:VCALENDAR" "{\"max_events\": 5}"
mentdb
[{"uid": "42@example.com", "summary": "Point d'avancement", "start": "2026-11-16T14:00:00", "all_day": false, "tzid": "Europe/Paris", "end": "2026-11-16T15:00:00", "rrule": "FREQ=WEEKLY;COUNT=3", "attendees": [{"email": "ana@example.com", "name": "Ana"}], "alarm_minutes_before": 60, "alarms": [{"trigger": "-PT1H", "action": "DISPLAY", "minutes_before": 60}]}, {"uid": "43@example.com", "summary": "Ferie", "start": "2026-12-25", "all_day": true}]
Used in use cases (1 recipe)

    Integrator & ETL developer › Send an appointment and a contact that open in every calendar and phone
Often used with

    file delete  ·  file exist  ·  file mkdir  ·  ics create  ·  qr create  ·  qr read  ·  string contains  ·  vcard create

vcard create <json_contact>


Description

    Create a vCard 4.0 text from an object, or several from an array: fn (or name; by default from n, then org), n {family, given, additional, prefix, suffix}, org, org_units, title, tel and email (a value or {value, type}, or a list; type: a word or a list), adr {type, po_box, extended, street, city, region, postal_code, country} or a list, url (one or a list), note, bday (YYYY-MM-DD), uid

Parameters

    json_contact:   The contact: JSON object, or an array - String - required
admin
vcard create "{\"fn\": \"Jean Dupont\", \"n\": {\"family\": \"Dupont\", \"given\": \"Jean\", \"prefix\": \"M.\"}, \"org\": \"ACME\", \"title\": \"Directeur\", \"tel\": [{\"value\": \"+262 692 00 00 00\", \"type\": [\"cell\", \"work\"]}], \"email\": {\"value\": \"jean@example.com\", \"type\": \"work\"}, \"adr\": {\"type\": \"work\", \"street\": \"1 rue de Paris\", \"city\": \"Saint-Denis\", \"postal_code\": \"97400\", \"country\": \"France\"}, \"url\": \"https://example.com\", \"note\": \"Client depuis 2019; VIP\", \"bday\": \"1985-04-12\"}"
mentdb
BEGIN:VCARD VERSION:4.0 FN:Jean Dupont N:Dupont;Jean;;M.; ORG:ACME TITLE:Directeur TEL;TYPE=cell,work:+262 692 00 00 00 EMAIL;TYPE=work:jean@example.com ADR;TYPE=work:;;1 rue de Paris;Saint-Denis;;97400;France URL:https://example.com NOTE:Client depuis 2019\; VIP BDAY:19850412 END:VCARD

vcard create <json_contact> <json_params>


Description

    Create a vCard with parameters: version (4.0 or 3.0). In 3.0 the N property is always written, the types are in upper case and BDAY has dashes

Parameters

    json_contact:   The contact - String - required
    json_params:   The parameters - String - required
admin
vcard create "{\"fn\": \"Bob\", \"tel\": {\"value\": \"0692\", \"type\": \"cell\"}, \"bday\": \"1990-01-31\"}" "{\"version\": \"3.0\"}"
mentdb
BEGIN:VCARD VERSION:3.0 FN:Bob N:;;;; TEL;TYPE=CELL:0692 BDAY:1990-01-31 END:VCARD
Used in use cases (1 recipe)

    Integrator & ETL developer › Send an appointment and a contact that open in every calendar and phone
Often used with

    file delete  ·  file exist  ·  file mkdir  ·  ics create  ·  ics parse  ·  qr create  ·  qr read  ·  string contains

vcard parse <text>


Description

    Read the contacts of a text (versions 2.1, 3.0 and 4.0): JSON array of {version, fn, n, org, org_units, title, tel, email, adr, url, note, bday, uid, other}, tel and email as [{value, types}]. TYPE parameters in any form, the bare types of 2.1, QUOTED-PRINTABLE with its charset, groups (item1.EMAIL). PHOTO and other unknown properties go in other when they are short (4096 characters at most). Its result can be given to vcard create, which does not write other back

Parameters

    text:   The text with BEGIN:VCARD - String - required
admin
vcard parse "BEGIN:VCARD VERSION:2.1 N;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:Dupr=C3=A9;Ren=C3=A9 FN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:Ren=C3=A9 Dupr=C3=A9 TEL;WORK;VOICE:+33 1 23 45 67 89 EMAIL;INTERNET:rene@example.com END:VCARD BEGIN:VCARD VERSION:3.0 FN:Bob TEL;TYPE=CELL,VOICE:0692 END:VCARD"
mentdb
[{"version": "2.1", "n": {"family": "Dupré", "given": "René", "additional": "", "prefix": "", "suffix": ""}, "fn": "René Dupré", "tel": [{"value": "+33 1 23 45 67 89", "types": ["work", "voice"]}], "email": [{"value": "rene@example.com", "types": ["internet"]}]}, {"version": "3.0", "fn": "Bob", "tel": [{"value": "0692", "types": ["cell", "voice"]}]}]

ics expand <event>


Description

    Give the occurrences of recurring events (RFC 5545): RRULE with FREQ, INTERVAL, COUNT, UNTIL, BYSECOND, BYMINUTE, BYHOUR, BYDAY, BYMONTHDAY, BYYEARDAY, BYWEEKNO, BYMONTH, BYSETPOS, WKST, and EXDATE, RDATE, RECURRENCE-ID. The input is iCalendar text, an .ics file, or a JSON event {dtstart, dtend or duration, timezone, rrule, exdate, rdate, uid, summary} or a list of them. The rule runs on the local time of the event: 09:00 stays 09:00 across a change of hour; a time that does not exist moves forward by the gap and a time that exists twice takes the first moment. DTSTART always counts as the first occurrence, as RFC 5545 says. COUNT counts distinct moments: two local times that fall on one moment around a change of hour count once. Without parameters at most 1000 occurrences are returned. Returns {count, truncated, occurrences: [{uid, summary, start, start_utc, end, all_day, recurrence_id if moved, location, description}], warnings}

Parameters

    event:   iCalendar text, a file or a JSON event - String - required
admin
ics expand "{\"dtstart\": \"1997-09-05T09:00:00\", \"timezone\": \"America/New_York\", \"rrule\": \"FREQ=MONTHLY;COUNT=3;BYDAY=1FR\"}"
mentdb
{"count": 3, "truncated": false, "occurrences": [{"uid": null, "summary": null, "start": "1997-09-05T09:00:00-04:00", "start_utc": "1997-09-05T13:00:00Z", "end": null, "all_day": false}, {"uid": null, "summary": null, "start": "1997-10-03T09:00:00-04:00", "start_utc": "1997-10-03T13:00:00Z", "end": null, "all_day": false}, {"uid": null, "summary": null, "start": "1997-11-07T09:00:00-05:00", "start_utc": "1997-11-07T14:00:00Z", "end": null, "all_day": false}], "warnings": []}
the last working day of the month, with BYSETPOS
admin
ics expand "{\"dtstart\": \"2026-01-30T17:00:00Z\", \"rrule\": \"FREQ=MONTHLY;COUNT=3;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1\"}"
mentdb
{"count": 3, "truncated": false, "occurrences": [{"uid": null, "summary": null, "start": "2026-01-30T17:00:00Z", "start_utc": "2026-01-30T17:00:00Z", "end": null, "all_day": false}, {"uid": null, "summary": null, "start": "2026-02-27T17:00:00Z", "start_utc": "2026-02-27T17:00:00Z", "end": null, "all_day": false}, {"uid": null, "summary": null, "start": "2026-03-31T17:00:00Z", "start_utc": "2026-03-31T17:00:00Z", "end": null, "all_day": false}], "warnings": []}
over the change of hour in Paris: 02:30 does not exist on 29 March
admin
ics expand "{\"dtstart\": \"2026-03-28T02:30:00\", \"timezone\": \"Europe/Paris\", \"duration\": \"PT1H\", \"rrule\": \"FREQ=DAILY;COUNT=3\"}"
mentdb
{"count": 3, "truncated": false, "occurrences": [{"uid": null, "summary": null, "start": "2026-03-28T02:30:00+01:00", "start_utc": "2026-03-28T01:30:00Z", "end": "2026-03-28T03:30:00+01:00", "all_day": false}, {"uid": null, "summary": null, "start": "2026-03-29T03:30:00+02:00", "start_utc": "2026-03-29T01:30:00Z", "end": "2026-03-29T04:30:00+02:00", "all_day": false}, {"uid": null, "summary": null, "start": "2026-03-30T02:30:00+02:00", "start_utc": "2026-03-30T00:30:00Z", "end": "2026-03-30T03:30:00+02:00", "all_day": false}], "warnings": []}
iCalendar text with an exclusion and a moved occurrence
admin
ics expand "BEGIN:VCALENDAR BEGIN:VEVENT UID:m1 SUMMARY:Stand-up DTSTART;TZID=Europe/Paris:20260302T090000 RRULE:FREQ=DAILY;COUNT=4 EXDATE;TZID=Europe/Paris:20260303T090000 END:VEVENT BEGIN:VEVENT UID:m1 RECURRENCE-ID;TZID=Europe/Paris:20260304T090000 SUMMARY:Stand-up moved DTSTART;TZID=Europe/Paris:20260304T140000 END:VEVENT END:VCALENDAR"
mentdb
{"count": 3, "truncated": false, "occurrences": [{"uid": "m1", "summary": "Stand-up", "start": "2026-03-02T09:00:00+01:00", "start_utc": "2026-03-02T08:00:00Z", "end": null, "all_day": false}, {"uid": "m1", "summary": "Stand-up moved", "start": "2026-03-04T14:00:00+01:00", "start_utc": "2026-03-04T13:00:00Z", "end": null, "all_day": false, "recurrence_id": "2026-03-04T08:00:00Z"}, {"uid": "m1", "summary": "Stand-up", "start": "2026-03-05T09:00:00+01:00", "start_utc": "2026-03-05T08:00:00Z", "end": null, "all_day": false}], "warnings": []}

ics expand <event> <params>


Description

    Give the occurrences in a window, with parameters: from (included), to (excluded), max (1000, up to 100000; truncated true says that there are more), timezone (of the dates without zone, and of a floating event), include_dtstart (true; false: DTSTART only if the rule gives it), uid (only this event), timeout_ms (10000, up to 120000). An ISO date, or an iCalendar date. A rule without end needs a window or stops at max. A rule that gives almost nothing, or a very long walk before the window with COUNT, stops at a scan limit of 5 million steps with a line in warnings. A TZID must be an IANA name (Europe/Paris): the VTIMEZONE blocks of a file are not read, and a Windows zone name is an error. RANGE=THISANDFUTURE is reported in warnings and only changes that occurrence. Rules in hours, minutes and seconds also run on the local time

Parameters

    event:   iCalendar text, a file or a JSON event - String - required
    params:   The parameters as JSON - String - required
admin
ics expand "{\"dtstart\": \"2020-01-07T09:00:00Z\", \"rrule\": \"FREQ=WEEKLY;BYDAY=TU\"}" "{\"from\": \"2026-11-01T00:00:00Z\", \"to\": \"2026-11-20T00:00:00Z\"}"
mentdb
{"count": 3, "truncated": false, "occurrences": [{"uid": null, "summary": null, "start": "2026-11-03T09:00:00Z", "start_utc": "2026-11-03T09:00:00Z", "end": null, "all_day": false}, {"uid": null, "summary": null, "start": "2026-11-10T09:00:00Z", "start_utc": "2026-11-10T09:00:00Z", "end": null, "all_day": false}, {"uid": null, "summary": null, "start": "2026-11-17T09:00:00Z", "start_utc": "2026-11-17T09:00:00Z", "end": null, "all_day": false}], "warnings": []}
cut by max
admin
ics expand "{\"dtstart\": \"2026-01-01\", \"rrule\": \"FREQ=YEARLY\"}" "{\"max\": 2}"
mentdb
{"count": 2, "truncated": true, "occurrences": [{"uid": null, "summary": null, "start": "2026-01-01", "start_utc": null, "end": null, "all_day": true}, {"uid": null, "summary": null, "start": "2027-01-01", "start_utc": null, "end": null, "all_day": true}], "warnings": []}