Code by UnifyApps enables custom code execution within automation workflows, supporting multiple programming languages including Groovy, Java, JavaScript, Python, and custom snippets for complex logic implementation.
Overview
Code by UnifyApps enables custom code execution within automation workflows, supporting multiple programming languages including Groovy, Java, JavaScript, Python, and custom snippets for complex logic implementation.


Actions Supported
Action | Description | Common Use Cases |
|---|---|---|
Execute Groovy code | Perform custom actions using Groovy | Data transformation, string manipulation, Java library integration |
Execute JavaScript | Perform custom actions using JavaScript | Web API integrations, JSON manipulation, frontend interactions |
Execute Python script | Perform custom actions using Python | Data analysis, machine learning, scientific computing |
Execute method from classpath | Invoke specified classpath methods | Accessing business logic, reusing enterprise methods |
Execute Java code | Perform custom actions using Java | Enterprise integrations, high-performance operations |
Execute custom code snippets | Execute pre-written code snippets | Reusing common logic patterns, standardized operations |
Execute Playwright script | Perform browser actions and return results | Web scraping, UI testing, form automation |
Libraries Supported
Python Libraries
LangChain Ecosystem: langchain, langchain-openai, langchain-experimental, langchain-community, langchain-huggingface.
Data Science and Machine Learning: pandas, numpy, torch, transformers, scikit-learn, boto3, sentence_transformers, spacy, nltk.
Security and Document Processing: presidio-analyzer, presidio-anonymizer, pymupdf, ebooklib, bcrypt, msoffcrypto-tool, cryptography.
Utilities and Helpers: openpyxl, requests, pytz, unstructured, markdownify, beautifulsoup4, lxml, xlrd, faker.
Framework Support: aiofiles, aiobotocore, pydantic, pydantic-mongo, parso, cohere.
Java, JavaScript, and Groovy libraries are generally supported. Contact support@unifyapps.com for specific library requests.
Use Case Example
A practical workflow captures email subject data and extracts components using regex:
Define input parameters (email subject).
Establish output parameters for extracted elements.
Write code with proper return statements.
Map inputs to the code block.
Pass outputs to downstream automation steps.
Important: Use appropriate casing for input/output parameters, since these names are used directly in your code.
Implementing Groovy Code
A step-by-step example converts a number to a string:
Define setup schema (input variables) and result schema (output format).Setup schema configuration with number input example
Select "CODE BY UNIFYAPPS" app and "EXECUTE GROOVY CODE" action. The platform auto-fills available input parameters.Action selection interface with code editor
Enter the Groovy code snippet.
Map inputs from previous workflow steps.
Output becomes available as data pills for downstream steps — map to the next step to continue the workflow.
Implementing Python Script
The process mirrors Groovy implementation:
Define setup and result schemas with input/output variables.
Select "CODE BY UNIFYAPPS" app and "EXECUTE PYTHON SCRIPT" action.
Enter the Python code snippet.
Map inputs from previous steps.
Output becomes available as data pills for subsequent steps — map to continue the workflow or return results.
Notes
Keep the following in mind when using Code by UnifyApps:
Keep code blocks small and focused on a single transformation; complex multi-step logic embedded in one Code node is harder to test and debug.
Import only the libraries the code actually uses; unnecessary imports increase execution overhead.
Test code in isolation using the single-step test before wiring it into a full automation run.
Code runs in a sandboxed environment; check the supported libraries list before relying on file system access, outbound network calls, or long-running loops.
Use the Output schema field to define the structure of the code’s return value; without a schema, downstream nodes cannot reference specific fields as data pills.