top of page
Writer's pictureJulian Kirkness

'Programming' Knack with Integromat (part 2)

If you've read Part 1 of this series you'll recall that we are working on a Knack app used to create repeatable processes from templates - for example for on boarding a new client. We had built an Integromat Scenario triggered when a new Process is created which generates all the steps in that process:


Each of the process steps are allocated to a user but at the moment there is no notification process to let them know the task has been allocated.


In this post, we are going to firstly create an email to notify each person, and then we'll add a calendar entry to the file which will enable the user to diarise each task if they wish.


You may be wondering why I am sending emails from Integromat when Knack has several facilities for sending them. There are two reasons - first, as we are creating the task records in Integromat there would be no trigger in Knack to send them - and secondly, emails sent directly from Knack are often junked by a recipient's email system. This is because they aren't actually sent from the sender address. Integromat, on the other hand, links to your email account and sends the messages through it.


Retrieving Email Addresses


Before we can send the emails, we are going to need the email addresses of the Process Owner, their Manager and, if relevant, any specific person a task is assigned to. We'll do this after the Knack steps which create the task records and then create the email.


For Steps Assigned to the Process Owner


First we need to add a Knack module to find the Owner's record:


You may notice that I have renamed the modules in the Integromat Scenario. I find this helps enormously when dealing with a more complex scenario - and it's just a matter of right clicking the module and selecting rename.


Next we create the email - in this case I am using an Office 365 Email module but this will work with many other email systems such as Gmail etc. You will need to create a 'connection' to your email account before you can do this.




Click on the Create and send a message and then you can start configuring the email:



Notice that I have set the content type to HTML - I generally do this in order to have more control over the layout of the email but you can do this just as well using the text option.


The only complicated part of this is the formatting of the date (the calculation of the due date itself is the same as in the Create Owner Task module). It formats the calculated date into DD-MM-YYYY format to make it more readable. Here's the end result:





Manager and Specified Person Steps


Having dealt with this one option I hope you can see that only small variations are required to retrieve the other users information and send them emails (perhaps with different text in the email. Once done, the Scenario will look like this:



Creating and Sending a Diary Entry File


As you know, many apps send out emails with clickable attachments (.ics files) that will create a diary entry - and it turns out that to create such an attachment from within Integromat is quite simple (see earlier post called Send a Calendar Entry from Airtable with Integromat for more details). The format of the text would be something like:


BEGIN:VCALENDAR

VERSION:2.0

CALSCALE:GREGORIAN

BEGIN:VEVENT

UID:(Use id of task).ics

SUMMARY:StepName

DTSTART;TZID=Europe/London:20190810T120000

DESCRIPTION:StepOverview + Link

STATUS:CONFIRMED

END:VEVENT

END:VCALENDAR


Values in Green are from the database.


Essentially all we need to do is to create the text for the file using a 'Compose a string' module from the Tools menu this will be added to the Scenario just before the send email module:



Again, the only hard part is to format the date to the required format.


Now we have the text for our .ics file, all that remains it to add it to the email:


And you end up with an overall Scenario which looks like this:




And your final email will look like this:



Complete with a link to add a calendar entry!


Summary


I hope you've found this article useful - here are some links which may also be helpful:


You can find out more information about Integromat here


and Knack here.


And the following articles about .ics files may be useful:



Next time we'll be looking at how to include links in the emails direct to the tasks - and we'll set up a My Tasks feature in the app.

536 views0 comments

Comments


bottom of page