Problem
A client needed to build a simple WordPress directory of certain businesses in specific locations on his existing WordPress site. The caveat was that his inputs are residing in several tables in Airtable and the client has NO HTML knowledge.
The goal was to:
- Allow the client to generate new pages containing relevant businesses sorted in custom order without having to go to WordPress at all.
- Allow the client to use Airtable as source of his inputs (e.g. H1, H2, descriptions, various business attributes…) for the generated pages. The Airtable tables are fully managed by the client.
- Create new pages or update existing ones every time the final Make scenario runs. The pages contain businesses from the particular location – e.g. all butchers in New York, all butchers in Boston etc.
Simply said, imagine that every time you add a new row to your source Airtable, a new record will be automatically added either to an existing WordPress page or a new WordPress page will be created from scratch. In the long run, the client will be generating/updating hundreds of pages containing thousands of businesses.
Solution
I was originally thinking to solve this project just by using Airtable + Make + WordPress. However, soon I realized this would be a no-go because Make would burn A LOT of operations making the project prohibitively expensive for the client. The main issue was to meet client’s requirement for custom sorting – imagine you need to list 500 businesses on one WordPress page representing a city (e.g. New York). The 500 businesses need to be sorted based on multiple criteria within the one city page. But you have several hundred pages like this representing different cities across the entire US. To get the sorting right within each US city, it would simply cost too many operations in Make.
So, after some thinking, I decided to use no code to codeĀ – but what does that even mean? I am using Make to:
- Download all Airtable inputs. (no code)
- Push the data to BigQuery where I would run SQL to generate HTML for all the needed pages. (code)
- Use Make again to get the generated HTMLs. (code)
- Push the HTMLs to WordPress as new/updated pages. (no code)
This is the project schema:
Of course, the BigQuery part is not an easy feat – you need to know SQL so you can transform your inputs into desired outputs – in my case texts representing HTML pages. Since I was an analyst in previous professional life, this part was feasible for me. The SQL allowed me to introduce the required custom sorting – especially by using window functions such as ROW_NUMBER() OVER (…).
Scenarios
Would you guess what it’s just ONE Make scenario handling the magic? What’s more, the scenario does not even look that crazy. At first, I download all the needed Airtable data to BigQuery and then I run BigQuery queries with Make to get the calculated HTMLs from the input Airtable data. That’s it. Make is not the hero of the show in this case – it’s the SQL in the BigQuery generating the pages. I am not going to bother you with the SQL – it’s more than 500 lines of custom code.
Conclusion
The project took only around 25 hours of complete while having a massive positive impact on the client who can now manage his directory listings from Airtable without having to write a single line of HTML. More importantly, the solution scales. It does not really matter if you add 200 new businesses into a certain location because processing one location will always consume the same number of operations in Make. The heavy lifting simply happens in BigQuery. Make is only used as a data pipeline.
This is what you can achieve when you combine no code with code.
Are you facing similar challenges?
HIRE ME
Or maybe you want to try yourself?
GO TO MAKE