This cheat sheet covers the Deluge syntax and built-in functions used most frequently in Zoho CRM and Creator scripting. Bookmark this page — it is the fastest way to find a function name, check syntax or recall how a specific operation works. For the foundational concepts behind these functions, see the Deluge introduction guide. For working examples of these functions in context, see the 5 Deluge scripts guide.
1. Basic Syntax
// Variables — no type declaration needed
myString = "hello";
myNumber = 42;
myDecimal = 3.14;
myBoolean = true;
myNull = null;
// Comments — single line only
// This is a comment
// String concatenation
fullName = firstName + " " + lastName;
// Semicolons end each statement
x = 10;
y = x + 5;
// Return a value from a function
return myValue;
// Logging (appears in execution log)
info "Processing record: " + recordId;
2. If / Else Conditions
// Simple if
if(score > 50) {
info "High score";
}
// If / else
if(status == "Active") {
// do something
} else {
// do something else
}
// If / else if / else
if(amount >= 100000) {
tier = "Gold";
} else if(amount >= 25000) {
tier = "Silver";
} else {
tier = "Bronze";
}
// Comparison operators
// == != = <=
// Logical operators
// && (and) ││ (or) ! (not)
if(score > 50 && industry == "Technology") {
...
}
3. Loops
// For each loop (iterate a list)
items = List();
items.add("Apple");
items.add("Banana");
for each item in items {
info item;
}
// While loop
counter = 0;
while(counter < 10) {
counter = counter + 1;
}
// Break out of a loop early
for each item in items {
if(item == "stop") {
break;
}
}
4. Map Operations
// Create a map (key-value pairs)
myMap = Map();
myMap.put("name", "Alice");
myMap.put("score", 95);
// Read from a map
name = myMap.get("name");
// Check if a key exists
if(myMap.containsKey("score")) {
...
}
// Get all keys
keys = myMap.keys();
// Remove a key
myMap.remove("score");
// Nested map (common in CRM record data)
owner = deal.get("Owner");
// returns a Map
ownerId = owner.get("id");
ownerName = owner.get("name");
// Shorthand for nested get
ownerId = deal.get("Owner").get("id");
5. List Operations
// Create a list
myList = List();
myList.add("item1");
myList.add("item2");
// Get list size
count = myList.size();
// Get item by index (0-based)
first = myList.get(0);
// Check if list contains a value
if(myList.contains("item1")) {
...
}
// Remove an item
myList.remove("item1");
// Remove by index
myList.remove(0);
// Iterate a list
for each item in myList {
info item;
}
6. String Functions
// Length
len = "hello".length();
// 5
// Contains "hello world".contains("world");
// true
// Starts / ends with "ABC-001".startsWith("ABC");
// true "report.pdf".endsWith(".pdf");
// true
// To upper / lower case "Hello".toUpperCase();
// "HELLO" "Hello".toLowerCase();
// "hello"
// Trim whitespace " hello ".trim();
// "hello"
// Replace "hello world".replaceAll("world", "Zoho");
// "hello Zoho"
// Split into a list
parts = "a,b,c".split(",");
// ["a","b","c"]
// Type conversions "42".toLong();
// integer 42 "3.14".toNumber();
// decimal 3.14 42.toString();
// "42"
7. Date and Time Functions
// Current date and time
today = zoho.currentdate;
// date only
now = zoho.currenttime;
// datetime
// Format a date as string
today.toString("yyyy-MM-dd");
// "2026-03-15"
today.toString("dd/MM/yyyy");
// "15/03/2026"
// Parse a string to date
myDate = "2026-03-15".toDate();
// Date arithmetic
tomorrow = today.addDay(1);
nextWeek = today.addDay(7);
lastMonth = today.addMonth(-1);
// Days between two dates (positive = d2 after d1)
days = date1.daysBetween(date2);
// Extract components
year = today.getYear();
// e.g. 2026
month = today.getMonth();
// 1–12
day = today.getDayOfMonth();
8. Zoho CRM Built-In Functions
// Get a single record by ID
record = zoho.crm.getRecordById("Deals", dealId);
// Search records with criteria
// (max 200 per call — paginate for more)
criteria = "(Stage:equals:Proposal Sent)";
records = zoho.crm.searchRecords("Deals", criteria, 1, 200);
// Create a new record
data = Map();
data.put("Subject", "Follow-up call");
data.put("Due_Date", "2026-04-01");
data.put("Owner", {
"id": ownerId
});
zoho.crm.createRecord("Tasks", data);
// Update an existing record
updateData = Map();
updateData.put("Stage", "Closed Won");
zoho.crm.updateRecord("Deals", dealId, updateData);
// Delete a record
zoho.crm.deleteRecord("Tasks", taskId);
// Get related records (e.g. contacts for an account)
relatedRecords = zoho.crm.getRelatedRecords("Contacts", "Accounts", accountId);
9. HTTP / API Calls
// GET request
response = invokeurl [ url: "https:
//api.example.com/data?key=value" type: GET connection: "my_connection_name" ];
// POST request with JSON body
params = Map();
params.put("name", "Alice");
params.put("email", "alice@example.com");
response = invokeurl [ url: "https:
//api.example.com/create" type: POST parameters:
params.toString() connection: "my_connection_name" ];
// Read response
status = response.get("status");
data = response.get("data");
10. Error Handling
For working examples combining these functions in complete scripts, see the 5 Deluge scripts guide and the custom functions guide. For structured Deluge learning from beginner to advanced, see the Deluge training programme.
// Try / catch block
try {
result = zoho.crm.getRecordById("Deals", dealId);
info "Success: " + result.get("Deal_Name");
} catch (e) {
info "Error: " + e.get("message");
// Log to a custom Error Log module, send an alert email, etc.
}
// Null check before accessing nested data
owner = record.get("Owner");
if(owner != null) {
ownerId = owner.get("id");
}
Frequently Asked Questions
What data types does Zoho Deluge support?
Zoho Deluge supports String, Integer, Decimal, Boolean, Date, DateTime, List, Map and Collection data types. Understanding which type a field returns is fundamental to writing correct Deluge code.
How do I call a Zoho CRM API from a Deluge script?
Use the invokeurl task with the appropriate Zoho CRM API endpoint and OAuth connection. See the full working examples at Making API Calls from Zoho Deluge →
What is the difference between input.get() and input.getAll() in Deluge?
input.get(‘fieldName’) retrieves the value of a single field from the triggering record. input.getAll() retrieves all fields as a map. Use getAll() when you need multiple fields, to reduce the number of function calls.
Can I use this cheat sheet as a reference while writing Deluge scripts?
Yes — that is exactly what this page is designed for. Bookmark it as a reference while working in the Zoho CRM function editor or Zoho Creator workflow builder.
Where can I get help with a specific Deluge problem?
ABR’s development team resolves specific Deluge scripting issues as part of our support service. Contact ABR →
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What data types does Zoho Deluge support?","acceptedAnswer":{"@type":"Answer","text":"Zoho Deluge supports String, Integer, Decimal, Boolean, Date, DateTime, List, Map and Collection data types. Understanding which type a field returns is fundamental to writing correct Deluge code."}},{"@type":"Question","name":"How do I call a Zoho CRM API from a Deluge script?","acceptedAnswer":{"@type":"Answer","text":"Use the invokeurl task with the appropriate Zoho CRM API endpoint and OAuth connection. See the full working examples at Making API Calls from Zoho Deluge →"}},{"@type":"Question","name":"What is the difference between input.get() and input.getAll() in Deluge?","acceptedAnswer":{"@type":"Answer","text":"input.get('fieldName') retrieves the value of a single field from the triggering record. input.getAll() retrieves all fields as a map. Use getAll() when you need multiple fields, to reduce the number of function calls."}},{"@type":"Question","name":"Can I use this cheat sheet as a reference while writing Deluge scripts?","acceptedAnswer":{"@type":"Answer","text":"Yes — that is exactly what this page is designed for. Bookmark it as a reference while working in the Zoho CRM function editor or Zoho Creator workflow builder."}},{"@type":"Question","name":"Where can I get help with a specific Deluge problem?","acceptedAnswer":{"@type":"Answer","text":"ABR's development team resolves specific Deluge scripting issues as part of our support service. Contact ABR →"}}]}










