In this tutorial we will create an attachment of ICS format (calendar invitation) which we will then upload to original ConfiForms entry and then will use it (include as attachment) in the email sent to user
If you are new to ConfiForms, please take a few minutes to read the Basic concepts Guide, or go through the video tutorial on that page.
Let's start with describing the building blocks. We will have a form with 5 fields
fileAttach - of type "File" to hold a created "on-the-fly" file
eventFileName - text field to ask for a file name to be used for naming the created "on-the-fly file"
eventTitle - text field to hold title of the event
dt - datetime interval field type to define when the event occurs
eventDescription is a textarea to hold the description of the event
The form looks like this when in view mode:
"File" field is hidden with ConfiForms Field Definition Rules macro like this:
(so it is hidden for new records (the ones which doe snot have and "id" assigned, therefore the filter is: "id:", and the action is to hide the field: "fileAttach"))
EventFileName field is not necessary, and is here only for the demo purpose, to show how you can use it with naming your files in IFTTT
See below...
And we have 2 IFTTT macros, which execute on record "created" event
We will look in more details at 1st IFTTT macro which creates the file and uploads it as attachment to the record
It is configured to "Create attachment" based on the template given, executes on "create" event, uses field "fileAttach" as field name the file should be attached to
Uses pattern for naming the file like this: [entry.eventFileName]_[entry.created].ics
And references the form and page where this form is located/configured
You are free to change the format of the file generated, in this example we were generating an ICS file based on the data we have, but you can generate any file you want based on your own template