Skip to main content

What It Does

  • Applies Python logic to reshape, filter, or enrich your data
  • Great for edge cases where no standard node (yet!) exists
  • Executes safely and returns updated data just like any other node
  • Ideal for RevOps, GTM, and CS teams who need a little extra power

🏁 Getting Started

Custom Code node configuration screenshot
1

Add the Node

Drop Custom Code anywhere you need more control.
2

Connect an Input

Choose any upstream table you want to transform.
3

Write Your Code

Your data is already loaded as df. Edit and manipulate it as needed.
4

Run the Node

Hit Run — your logic is applied row-by-row.

Inputs

🛠️ Required

  • Python Code (✅)
    Simple Python edits applied to your df.
    Why it matters: This is where your logic lives — whether filtering rows, scoring leads, or cleaning fields.
⚠️ Invalid code will throw an error, and the node will not run until fixed.

Output

  • Your updated data, transformed exactly how your logic says
  • All original columns are preserved unless you overwrite them
  • You can keep building off this output downstream
Custom Code output screenshot

🚀 Example Use Cases

Use CaseCode Snippet
Add a columndf['is_target'] = df['industry'] == 'SaaS'
Clean up namesdf['name'] = df['name'].str.title().str.strip()
Filter rowsdf = df[df['region'] == 'North America']
Create lead scoredf['score'] = df['revenue'] / df['employee_count']

✨ Pro Tips

Use this node only when a built-in node doesn’t meet your need — it keeps flows simpler and more scalable.
Leverage AI tools like ChatGPT to help write or review your code. You don’t have to go it alone.
Start small — even a one-liner can save hours of spreadsheet work later.
Use the toggle button to switch between test mode (purple) and full mode (green).
Test mode runs your code on just the first 5 rows — great for testing your logic before applying it across the full dataset.

⚠️ Considerations

Broken code = node won’t run. The UI will surface any syntax issues immediately.
Only use this node for scenarios we don’t already support — we’re constantly adding more built-in nodes to make your life easier.
Be mindful when renaming or dropping fields — changes persist downstream.

📝 FAQ

It’s your input data — a DataFrame you can write Python against.
Nope. If you can describe the logic, you can usually get AI tools to write it for you.
Built-in nodes are faster, safer, and easier to maintain. Use code only when necessary.

💰 Pricing

This node is free — no credits required.

Use code only when you need it. Custom Code gives you flexibility — but we’re always building smarter nodes to save you the trouble.