🧠 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:

  1. Choose "Ask question about items with AI" from the column options.
  2. Use the formula option and prompt the AI to count the total number of experiences.
  3. 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.

Adjusting the formula when the AI doesn't get it right
Using AI formulas to extract all of a contact’s experience from a social profile

🔧 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:

  1. Add a new enrichment for personal emails.
  2. Click on "Run Settings" and then "Conditional Run."
  3. 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.

Checking the AI-generated code for conditional runs
Creating a conditional run for personal emails

💼 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.

Data Cleaning + Normalization
After building your own AI formulas, dive deep into Clay’s native integrations built to help you quickly common gnarly data hygiene problems - like standardizing company name or filtering a list.
Course Completed
Intro to Clay 101
2 mins
Watch lesson
Current Lesson
Find Companies
3 mins
Watch lesson
Current Lesson
Enrich Companies (Waterfalls)
4 mins
Watch lesson
Current Lesson
Enrich People (Waterfalls)
5 mins
Watch lesson
Current Lesson
Prompt Engineering Crash Course
8 mins
Watch lesson
Current Lesson
Claygent: AI Web Scraper
7 mins
Watch lesson
Current Lesson
AI Formulas + Conditional Runs
8 mins
Watch lesson
Current Lesson
Data Cleaning + Normalization
3 mins
Watch lesson
Current Lesson
Intro to Al Snippets (Copywriting)
4 mins
Watch lesson
Current Lesson
Lead Scoring
7 mins
Watch lesson
Current Lesson
Push Data To Your CRM
5 mins
Watch lesson
Current Lesson
Push Data To Your Email Sequencer
4 mins
Watch lesson
Current Lesson
Download as a CSV
3 mins
Watch lesson
Current Lesson
Import from CRM
3 mins
Watch lesson
Current Lesson
Google Sheets
6 mins
Watch lesson
Current Lesson
Find Local Businesses Using Google Maps
3 mins
Watch lesson
Current Lesson
Find Company Lookalikes
7 mins
Watch lesson
Current Lesson
Find Jobs Source + Enrichment
5 mins
Watch lesson
Current Lesson
Write to Table
6 mins
Watch lesson
Current Lesson

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.

Clay branded illustration of a wall made out of 3D, colourful, clay bricks and a whimsical person opening a door in the wall to access a new world of opportunities.

Clay University

Master Clay in a few core lessons. Uplevel your data enrichment, craft better outbound messages, and book more meetings.

Learn with Clay

Go to market blog

Our best content on growing your GTM motion, from outbound sales automation to AI lead generation.

Explore our blog
Clay branded illustration made out of 3D clay objects showing  whimsical operators connecting cables to 3D Clay table

Integrations

Browse through all the integrations you can connect to Clay in seconds and discover what you can do!

Explore integrations
Clay branded illustration of a Clay table with colourful, 3D connectors made out of Clay around it

Templates

Power your outbound campaigns with our best templates.

Visit clay templates
Clay branded illustration of a messy tangle of 3D, colourful strings made out of clay being untangled into one, colourful, twisted string

Clay Experts

Hire a Clay Enterprise expert or find a Clay partner to help with your next project

Explore Clay experts

Clay's Chrome extension

Clay’s Chrome Extension makes it wicked easy to find leads almost anywhere on the internet

Explore Chrome Extension