AdlyseAdlyseDocs
Welcome
Getting Started
QuickstartOnboarding Wizard
Essentials
DashboardAd AccountsExplorerReportsSearch TermsDecision Log
AI Studio
Adlyse AISkillsGuidelinesSchedules
Admin
OrganizationTeam
Integrations
OverviewMCP Servers →API Keys
Legacy Docs
OverviewQuickstartCookbookWorkflowVariablesKnowledge BaseAPI Keys (legacy)NodesSelf HostingSelf-Host Auth
  1. Overview/
  2. Core Concepts/
  3. Nodes

Code Node

The Code Node executes custom Python scripts within your workflow.

Overview#

Use Code Nodes when you need:

  • Custom data transformations
  • Complex logic not available in other nodes
  • Integration with Python libraries
  • Data parsing or formatting

Configuration#

Python Code#

Write your Python script in the code editor:

python
# Access input variables
user_input = inputs.get("text", "")
 
# Process data
result = user_input.upper()
 
# Return output
return {"processed_text": result}

Input Variables#

Define which variables are passed to your script.

Available Features#

  • Standard Python libraries
  • JSON parsing
  • String manipulation
  • Mathematical operations
  • Regular expressions

Output#

Return a dictionary that becomes available to downstream nodes.

Best Practices#

  1. Handle edge cases and empty inputs
  2. Keep scripts focused and simple
  3. Use descriptive variable names
  4. Add comments for complex logic