Most of us are used to receiving calendar invitations in an email message. You can create and send such messages with customized calendar invitations via an AppSheet workflow rule.
At a mechanical level, this involves creating an attachment file that is sent along with the email message. The attachment file uses a well-known format called ICS /iCalendar. Such files typically have the suffix .ics in their name. In AppSheet, you will create a template for such a file. Any placeholder expressions in the template will be replaced with actual values when the workflow rule is executed.
There are two steps required to set this up while you are creating a workflow rule with an Email action:
- Choose ICS_CALENDAR as the Attachment Content Type
- Create an appropriate attachment template.
Two ways to create an .ics Attachment Template
The easiest way to create an attachment template is to click on the Create button in the Attachment Template field, after selecting the Attachment Content Type. In a few seconds, a template file is created in your cloud file system, and you can click on the View button to see it.
Another approach is for you to create the file manually in your cloud file system. Then you can select it in the Attachment Template field.
In both cases, it is important that this be a text file with a .ics file suffix and with valid ICS content as described below.
Editing the .ics Attachment Template
Most cloud file systems like Google Drive will not let you edit a .ics file directly. To edit the template you must:
- Download the template file from your cloud file system to your computer.
- Edit the template file on your computer using the text editor of your choice (eg: Notepad).
- Upload the edited template file from your computer to your cloud file system.
Manually Creating the Template
You can manually create a template file by creating an empty .ics file and adding text like that below.
SUMMARY:Invitation from <<USEREMAIL()>> to talk about <<[MeetingTopic]>>
Please notice that the template includes placeholders (eg: <<[StartDateTime]>>) that will be dynamically replaced by actual values when the action is executed. The actual placeholders expressions will depend on the specifics of your app.
This is only a simple example. The .ics format is very rich and can construct very complex calendar invitations. You can read more about it and see examples at https://icalendar.org