What this scenario does: Automatically creates UTM links in Airtable, if the ‘shorten link’ option in the table is selected, the scenario triggers instantly, creates the shortened link and adds it to the table.
Level Of Difficulty: Intermediate
Implementation Time: Approximately 25 mins
Using a UTM link is a popular and accurate way to track the performance of your campaigns by adding a simple UTM code to a URL. The good news is that you don’t need to create these links manually any longer and to top it off, you can automatically shorten the link in Integromat (who uses those long untidy links these days anyway?) so that it’s ready to use wherever you need to.
Configuring the scenario
The scenario consists of the following modules:
- Webhooks > Custom mailhook
- Text Parser > Match pattern
- Bitly > Shorten URL
- Airtable > Update a record
Here’s the scenario:
In the Webhooks > Custom mailhook module, add or select an existing mailhook. Copy the address and head over to Airtable:
Click on Automations and paste the link in the To field under Send an email:
In the UTM link field on the table, this function was added which automatically creates the UTM link for you:
Back in the scenario, on the route between the Webhook module and the Text Parser > Match pattern module is a filter. The purpose of this filter is to verify if the text from the Webhook contains ‘https’. If so, it means that the UTM link has been received and the bundle will pass through to the Text Parser.
Click on the route and add a filter. Map the Text element, select the Contains (case insensitive) text operator and enter ‘https’ in the bottom field:
The Text Parser > Match pattern module follows the Webhook module which is used to parse the text received by the Webhook module in order for it to be used in the subsequent modules.
In this case, the text is parsed to provide the UTM URL and the Record ID from Airtable. Copy and paste this regex in the Pattern field: UTM Link:(.+)Record ID:\n(.+)
In the Text field, map the Text element outputted by the Webhooks module as this is the text that will be parsed:
In the Bitly > Shorten URL, simple map the $1 element from the Text Parser module which contains the original URL:
The last module in the scenario is the Airtable > Update a record module. Here, the shortened URL is added to the table. Select the Base, the Table and map the $2 element which contains the Record ID from the Text Parser module to the Record ID field:
In the Shortened UTM link field, map the Link element which contains the shortened link that was created in the previous module:
All set! Let’s run a quick test.
Here you see that the original link, campaign, source and medium were added to the table and the UTM link was automatically created. After selecting the Create Bitly? option, the scenario was instantly triggered, the shortened link was created and added to the table:
So there you go, a very useful scenario that is quite simple to create.