Megan Peters adapted this from BASIC VERSION OF REDIRECT APP by Amirhe(Sam Ray)atnia
Creating new shortlinks should only be done for shortlinks that do currently exist. If a short link exists, but only the airtable form has change, you can simply open the short link and change the base path attribute. This is also true for adding new params.
The portal now contains 2 new apps:
.1SHORTLINKCREATOR: Creates short links to embed into redirects to pull credentials into Airtable for targeted users (e.g. students or TAs).
.2REDIRECT: Uses the shortlinks to send users through the portal and then back to the target Airtable survey.
The SHORTLINKCREATOR app has 2 model params which indicate which parameters we can pull from the user accounts and send over to Airtable.
- For example: unique_id from user, email from user.
The REDIRECT app will grab those params and redirect the user to the targetpath with those params sent along the way.
If Users.unique_id is the full path to the thing we are grabbing, fill this out with:
- Name: user_id { name of field in the target Airtable }
- Params: unique_id { thing to pull from the portal }
- Origin: Users { this is the table source for the thing to pull from the portal}
This may auto-fill in when you create a new shortlink. You only need this field, not the other ones.
^ MAKE IT LOOK LIKE THIS ONE
The goal is to create a short link that will pull users through the portal, grab a user id or similar, and then send it back to Airtable.
The short link contains base path, params, and a name.
The REDIRECT app attaches the proper redirect path to the shortlink.
The general format for the reroute is:
https://<base_url>/api/redirect/to/<shortlink>/
you can use this format in your email to extract proper data.
- Base URL: portal.neuromatchacademy.org
- Short link: is a UUID 4 base slug which you create in panel.
- example: 17069c02-e544-4dc0-95cf-5fc5d383fc4d
- you can create UUID 4 codes in bulk here
So a sample URL looks like:
A data example and expected result:
- Param A: user.pk
- Param B: user.email
- Param C: user.first_name
- Param D: user.last_name
Short link J:
Base path: airtable.
- Param A, param C, param D.
Reroute A: Shortlink J
Slug 85b35ea9-76ac-4ab8-8b21-aeec880231c3
Reroute B: Shortlink K
Slug f901bbfd-4257-40ae-9eec-568b8b5cee4c