skip navigation
Trumba Web Calendar Software
Trumba Help Center What’s New | FAQ | Support Forum | Email Support

Prepare iCal files for import

The iCalendar (a.k.a. .ics) import allows events to be created, updated, or deleted on a Trumba calendar by sending an iCalendar (RFCs 2445 and 2446) format file to the Trumba server through an HTTP PUT operation.

Note The information in this topic assumes that you have familiarity with the iCalendar file format. For more information regarding the iCal file format refer to RFC2445 and RFC2446.

Topic links

By programmatically uploading iCal files to Trumba Connect, you can update data of existing events without duplication or alteration of other event data. For information about how to upload iCal files into Trumba Connect, see Programmatically upload iCal files.

Basic iCal file that can be uploaded into Trumba Connect

Below is a minimal sample iCal file that can be uploaded to Trumba Connect.

PRODID:-//Company Name//Product//Language
SUMMARY:Happy New Year!

The UID is required in all cases. This allows for existing event data to be modified. It must be unique for new events.

By default, event metadata such as timezone is inherited from the target Trumba calendar. Timezone can optionally be specified at the event level using the appropriate iCal syntax (e.g DTSTART;TZID).

Standard and required iCal fields used by Trumba Connect

The iCal file you publish to Trumba Connect, must contain certain fields and can optionally contain other fields. The table below summarizes how Trumba Connect's event form fields map to the field definitions in the iCal file.

Trumba Event FormICS File Field
* Denotes required field.

Using Trumba Connect custom fields in iCal files.

You can import iCal files containing custom fields defined in Trumba Connect. Numeric identifiers are used for all event templates, custom fields and many built-in fields. This will ensure that values are imported into the correct fields even if the names of the fields change. This requires you to know the numeric identifiers of the fields you want to import from the iCal file. To get all of the numeric identifiers you need, you must perform sample exports of your existing data in the Trumba calendar.

Custom field import

Here are the steps needed to specify custom field values in events to be imported into Trumba Connect.

  1. Identify an existing calendar that contains all Trumba Connect event templates, images, and custom fields that are to be available for import. If no such calendar exists, create one for this purpose.
  2. Create events, one for each event template you want to eventually import. When you're finished, you should have events that specify values for all custom fields, event templates, and images.
  3. Export the calendar as an iCal (ICS) file. Inspect the resulting exported file. Construct a map of the Trumba Connect custom field ID numbers to the custom field values shown in the file. For example, the following line might appear in the exported iCal file.
X-TRUMBA-CUSTOMFIELD;NAME="Comments";ID=10899;TYPE=MultiLine:My Comments

To import the above custom field "Comments", you must specify ID=10899 in the iCal import file.

The iCal file being imported requires only the ID and value. The TYPE and NAME attributes are ignored. Hence, the import of the "Comments" custom field could look like this;

X-TRUMBA-CUSTOMFIELD;NAME="Comments";ID=10899;TYPE=MultiLine:My Comments

or be simplified as shown below.

X-TRUMBA-CUSTOMFIELD;ID=10899:My Comments Amended

Importing images

Images are specified by URL. This can be a URL to an external image on the internet or a URL to an image previously copied into the Trumba servers using the "manage images" feature.


Sample import file

Below is a sample iCal file with custom fields. It includes a range of Trumba Connect custom field types and an event image. The NAME and TYPE attributes have been left in the file to provide contextual information.

Tip The sample file demonstrates the use of the backslash (\) escape character in the Location, Description, and MultiLine text fields:

  • You may escape commas (,) and semicolons (;) used in text fields by preceding them with a backslash(\).

    For example, the Description field contains this text: This event starts at 8:00 a.m. PT on Jan 1\, 2010. The backslash guarantees that the comma following Jan 1 will be interpreted as a punctuation mark rather than a delimiter.

  • If you want to include a backslash (\) in a field's text, you must escape the backslash with another backslash.

    For example, to include a backslash in Description field text, you type: Use the backslash (\\) as the escape character.

  • An intentional formatted text line break, such as in the MultiLine field, must be represented by a backslash followed by the letter "n".

    For example: This is line 1\nThis is line 2.

PRODID:-//Company Name//Product//Language
SUMMARY:CustomField Event1
LOCATION:1200 Fifth Ave\, Seattle WA 98101
DESCRIPTION:Event Notes: This event starts at 8:00 a.m. PT on Jan 1\, 2010.
X-TRUMBA-CUSTOMFIELD;NAME="Event Type";ID=21;TYPE=Number:Contains all Custom Field Types
X-TRUMBA-CUSTOMFIELD;NAME="my single line of text";ID=12295;TYPE=SingleLine:This is a single line of text
X-TRUMBA-CUSTOMFIELD;NAME="my multiple lines of text";ID=12296;TYPE=MultiLine:This is line 1\nThis is line 2
X-TRUMBA-CUSTOMFIELD;NAME="my list of choices";ID=12297;TYPE=CustomAsset:my choice 2
X-TRUMBA-CUSTOMFIELD;NAME="my yes or no";ID=12298;TYPE=Boolean:Yes
X-TRUMBA-CUSTOMFIELD;NAME="my number";ID=12299;TYPE=Number:1000000
X-TRUMBA-CUSTOMFIELD;NAME="my currency";ID=12300;TYPE=Currency:$1000
X-TRUMBA-CUSTOMFIELD;NAME="my web link";ID=12301;TYPE=Url:
X-TRUMBA-CUSTOMFIELD;NAME="my email address";ID=12302;
X-TRUMBA-CUSTOMFIELD;NAME="my phone number no ext";ID=12303;TYPE=PhoneUS:206-696-7200
X-TRUMBA-CUSTOMFIELD;NAME="my international phone number";ID=12304;TYPE=PhoneInt:+011-206-696-7200
X-TRUMBA-CUSTOMFIELD;NAME="Event image";ID=40;TYPE=Image:*2Ogw9Dasd3.jpg
Privacy | Terms | Public Calendars