Using the free plans across Airtable, Cloudflare, and Github, you can make your own link shortener using a paid domain name.
- Create an instance of the Airtable base
- Under the "Short URL" column, customize the formula so it uses your domain name.
- If it wasn't created for you already, make an automation as follows:
- Triggered on record create
- Script step: Runs this script. Make sure you set an input config variable called "id" to the "ID" field value from the previous step and "recordID" for the Airtable Record ID.
- Update record step: Table: Links, Record ID: ID from first step, Fields: Code: Get code from previous step. You'll need to test the previous steps first.
- Test this automation, then turn it on. If it works, you'll get the code field populated on each new row created.
- Follow the steps to make a read-only API key.
- Update these two lines in your fork to use that API key and the base ID.
- Fork this repo.
- In settings, activate pages using the main branch
- Use these instructions to set up your pages site for proper connection to the domain.
- Create a new site pointed at your github pages repo (the one from the fork of this one). Use these instructions if you need help connecting Cloudflare to the github repo.
- In Rules, create a URL rewrite transform rule that matches the hostname (your domain), then rewrites the path to just "/" (leave the field blank). That's it. We're just making everything go to root so it hits the index.html in your fork.
If at first you don't succeed, give it about 20m, you may be waiting on Cloudflare/Nameserver updates to propagate.
Issues? File an one in this repo and I'll take a look.