Hi!👋 Recently in https://community.zapier.com/discussion/comment/884 discussion, I started thinking that making Zaps is similar to programming. There we have a maxim that suggests minimizing duplication as much as possible. Most of the time you will find it under DRY (don't repeat yourself) or OAOO (once and only once) names.
How do you avoid logic duplication in your Zaps? I've already discovered two possible ways:
- Decoupling several Zaps with different beginnings and the same ends. You can do it by splitting Zap into two: unique start + Webhook as first Webhook + same end as last (thank you,
@PaulKortmanfor the initial idea).
- Moving your Code by Zapier to external API and reusing it between different Zaps in case of necessity.
Do you have any other optimization ideas?
Instead of creating a lookup table in each step 1 zap, I created a spreadsheet with two columns, and used that as a lookup table (find row in Google Sheets) -- so I just added a single step into each "step 1" zap calling to that sheet. Then I tweaked the values needed to pull from that step and column B.
This is more DRY in the sense that if I need to add values or change spelling etc I just have one place to change it instead of in 10+ places.
TLDR; I used a single Google Sheet as a lookup table in 10+ zaps.