Learn and master Clay with Clay university
Featured in Clay University
Build Your First Function
By the end of this lesson, you'll be able to create working functions that you can call from any table in your workspace.
🔨 Creating the Function
We'll create a function for a simple waterfall enrichment to find a person's work email.
First, verify that the workflow works. Check that the waterfall is working properly before saving it as a function.
When ready to create the function:
- Select the columns that will be part of the function
- Right-click and choose "Save as function"
- Give it an easily identifiable name - Avoid having a function library full of unnamed functions, similar to a workspace full of unnamed tables.
The function will automatically map the inputs. Select the outputs, then toggle on replace the columns with this function.
When selected, the columns get deleted, leaving one clean column calling the function. You can also create and open the function from the function library. Click in to pull out the validated work email, and it'll start to populate.
🔄 Calling a Function from Another Table
Functions can be called from different work tables. Additionally, any edits to a function propagate through all tables that reference it.
To call a function from another table:
- Find the function you created
- Configure the inputs, e.g. map domain, name, etc.
- Set any conditionals on running the function
- Click Save
The function is now running in this different table.
✏️ Editing a Function
Find your function library in the left side nav and search for your function.
Any edits to this function propagate to all tables where it's called.
You can:
- Delete providers
- Move around providers
- Change inputs
When you save changes, they automatically propagate to every table using that function.
🚀 What's Next
You now know how to build, save, and call a function. In the next lessons, we'll deploy functions across a team, scale them to high volume workflows, and maintain them as your use cases grow.



