🧠 Unlocking the Power of AI Formulas in Clay
This might be one of the most important lessons in this course - because it’s key to maximizing the value that Clay provides while minimizing your costs.
AI formulas are credit-free ways to get AI to help you generate custom code in your table that can format, clean, and reshape your data exactly how you want it. We can’t tell you how many times we see users using the AI integration in place of an AI formula in a large table, which can save you hundreds, or thousands of credits.
Conditional runs (which make use of AI formulas!) are how you ensure that you only run enrichments on rows that meet your data criteria. For example, you may only want to run a personal email waterfall for rows where a work email was not found (vs. running personal emails for all rows). That’s where condition runs come into play.
Let’s dig in.
💡 The Beauty of AI Formulas
When you use enrichments like the base enriched person from profile action, you gain access to a wealth of information. This includes work experience, job titles, education history, certifications, and even volunteering experience. However, the real magic happens when you start using AI formulas to extract specific insights from this data.
Let's say you want to know the total number of educational experiences for each person in your table. Instead of manually counting or writing complex formulas, you can use an AI formula. Here's how:
- Choose "Ask question about items with AI" from the column options.
- Use the formula option and prompt the AI to count the total number of experiences.
- The AI will generate the appropriate code to give you the desired output.
You can apply this same principle to count job experiences, concatenate company names, or string together job titles. The possibilities are nearly endless.
🔧 Troubleshooting AI Formulas
Sometimes, the AI might not give you exactly what you're looking for on the first try. Don't worry – this is normal and part of the process. You can iterate on your prompts, adjust the wording, or even directly modify the generated code to get the results you need. Remember, the preview feature is your friend here, helping you ensure you're getting the right data before applying the formula.
🔀 Mastering Conditional Runs in Clay
Conditional runs are another powerful feature in Clay that can help you optimize your data enrichment process and save credits. Let's explore how they work and how you can leverage them effectively.
🌊 Revisiting Waterfalls, the Original Conditional Run
You've actually already used conditional runs without even knowing it … because conditional runs are at the core of what waterfalls do! Waterfalls set up a series of enrichments that run in a specific order, with each subsequent enrichment only running if the previous ones didn't return results. This is achieved through conditional formulas running in the background. But you can modify these conditional formulas however you want to build the workflows of your dreams.
🛠️ Building Custom Conditional Runs
The real power comes when you start creating your own custom conditional runs. For example, let's say you want to find personal emails only for contacts where you couldn't find a work email. Here's how you might set that up:
- Add a new enrichment for personal emails.
- Click on "Run Settings" and then "Conditional Run."
- Use the AI to generate a formula that only runs if the validated work email is blank.
This ensures you're not wasting credits trying to find personal emails for contacts where you already have a work email.
💼 Optimizing Your Workflow
By using conditional runs, you can create highly optimized workflows that only run enrichments when necessary. This not only saves you credits but also ensures you're getting the most relevant data for each contact in your database.
🚀 Putting It All Together
The combination of AI formulas and conditional runs in Clay provides a powerful toolkit for data enrichment and analysis. You can extract deep insights from your data, create custom enrichment flows, and optimize your credit usage – all within the same platform.
Remember, the key to mastering these features is experimentation. Don't be afraid to try different formulas, adjust your conditions, and see what works best for your specific use case. With practice, you'll be able to create sophisticated data workflows that give you exactly the information you need, when you need it.
Connect, explore and learn together
Read our GTM blog, or try out our top Claybooks and templates to transform your growth ideas into outreach in minutes.