India+91 96296 27092USA+1 659 777 0392hari@flowpeakconsulting.comWhatsApp IndiaWhatsApp USA
Flowpeak ConsultingFlowpeak Logo Mark

How-to

Zoho Flow Custom Functions: When to Use Deluge and How to Build One

Harikrishnan, founder of Flowpeak ConsultingBy Harikrishnan (The Zoho Mechanic), Founder & Chief Zoho Consultant, Flowpeak · 10+ years in Zoho · Published · Last updated

In the Zoho Flow builder, open the Logic tab, click Custom Functions, then +Custom Function. Name it, pick a return type such as string or map, add typed input parameters, write the Deluge code and save. Drag the function into your flow and map its inputs. Use one when built-in actions and decisions cannot reshape the data or call the API you need.

Zoho CRM setup from USD 500Fixed price in writing. Every service has a published price.

  • Registered Zoho partner
  • Calls in your business hours
  • 30 days of free fixes

Who this is for: Zoho Flow builders who have hit the edge of drag-and-drop actions: a date in the wrong format, a list that needs joining, a discount that needs calculating, or an API with no ready connector. It explains when a custom function is the right tool, how to create one step by step, the input and return types Zoho supports, how to call external APIs through connections, what Zoho says about limits, three short examples, and the mistakes that make functions hard to maintain.

How do you create a custom function in Zoho Flow?

Open the flow builder, go to the Logic tab, click Custom Functions and then +Custom Function. Give it a name, choose a return type, add input parameters, write Deluge and save. The function is then listed under Logic > Custom Functions and can be dragged into any flow in your organisation.

You can also manage all functions from Settings > Custom Functions. Zoho's pricing page lists custom functions on the Standard and Professional plans.

When to use one, and when not to

  • Use a function to reshape data: convert dates, split names, join lists, clean phone numbers or build a JSON body.
  • Use one for business logic the decision block cannot express neatly, such as tiered discounts or mapping one app's status values to another's.
  • Use one to call an API with no Zoho Flow connector, through invokeURL and a connection.
  • Do not use one where a built-in action already exists. Built-in actions are easier for the next person to read and maintain.
  • Do not put a whole integration in one function. Keep each function to one job and let the flow show the steps.

Step-by-step setup

  1. In the builder, open Logic > Custom Functions and click +Custom Function.
  2. Enter a name. It must start with a letter or underscore and use only letters, numbers and underscores.
  3. Choose the return type: void, int, float, string, bool, date, map, list or file. The default is void, which returns nothing.
  4. Add input parameters and their types: int, float, string, bool, date, map, list or file. An input cannot be void.
  5. Click Create, write the Deluge code and click Save.
  6. Drag the function from Logic > Custom Functions into the flow.
  7. In the configuration window, map each input to a variable from earlier steps, then click Save.
  8. Run Test & debug and check the function step's input and output.

If the function returns a map, run it once with sample data so you can map individual keys in later steps. Zoho also notes that date-time fields must be converted to strings before you pass them into a custom function.

Calling external APIs with connections

  1. In the custom function console, open My Connections.
  2. Find the connection and click View Details, or click Create Connection if it does not exist.
  3. Copy the code snippet or the connection link name into your function.
  4. Use it with the invokeURL task. Zoho says connections work only with invokeURL; predefined integration tasks are not yet supported.
  5. Move any old code that passes an authtoken to an OAuth connection. Zoho states authtoken-based connections will stop working.

Limits to know

Zoho's custom function article for Flow does not publish its own limits. The general Deluge limits page lists 5,000 statements per function, 75 function calls within a function and a 5 MB maximum response for an invokeUrl task. Zoho notes those figures are under review and may not be accurate, so treat them as guidance.

Your Zoho Flow plan's monthly task allowance still applies, and the target app's own API limits still apply. Loops that call an API once per item are where limits bite first.

Three short examples

  • Date conversion, from Zoho's help: inputs myDate, fromFormat and toFormat, all strings, and a string return. The body is one line: return myDate.toTime(fromFormat).toString(toFormat);
  • Join map values into one line: loop with for each over the map's keys, append each value and a comma to a result string, then return the string. Useful for writing several fields into one notes field.
  • Client type by job title, following the pattern in Zoho's help: if the title is CEO set clientType to Executive, else if it is Admin set it to Operations, else set it to Standard, then return clientType. Later steps can branch on the result.

For more patterns, see our Deluge scripting examples. If a function needs to be written or reviewed by a specialist, our answer on where to find a Deluge expert explains what to look for.

Mistakes we see often

  • Editing a shared function without checking where it is used. Any member can edit or delete a function, and deleting one affects every flow that uses it.
  • Passing a date-time variable without converting it to a string first.
  • Hard-coding tokens or API keys in the script instead of using a connection.
  • Returning void and then expecting to map an output in later steps.
  • No error handling around invokeURL. Check the response and return a clear value so the flow can branch rather than fail silently.

How Flowpeak helps

Flowpeak is a registered Zoho partner with Zoho-certified consultants, working from Chennai, India with clients worldwide (USA, UK, Canada, Australia, Europe, the Gulf and India). We write, review and document Deluge custom functions for Zoho Flow, and refactor flows that have grown too complex. See our Zoho Flow implementation service. We quote a fixed price agreed in writing after a free 30-minute call. Where a function is part of a wider integration between systems, integrations start from USD 270 (INR 25,000).

Want help putting this into practice? Flowpeak works as a Zoho Flow consultant, headquartered in Chennai. Book a free call to talk through your setup.

What this usually costs and how long it takes

Zoho CRM setup
from USD 500, GBP 400, EUR 450, CAD 700, AUD 760 or AED 1,850. In India we quote after a free call.
Moving your data into Zoho
from USD 380
Connecting Zoho to another tool
from USD 270
How long it takes
most CRM setups go live in about two weeks

You get a fixed price in writing before any work starts. Zoho licences are billed by Zoho separately.

What clients say

“Working with FlowPeak Consulting was a really good experience for us...”
Team EON Group
Zoho CRM, Books and Inventory implementation
“Working with Flowpeak Consulting on our Zoho implementation was a really positive experience...”
MD, Southern Industries
Zoho One implementation
“We had a good experience working with Flowpeak Consulting for our Zoho implementation at Almapuro...”
Almapuro Agri Private Limited
Zoho implementation

Free · 60 seconds

Get your Zoho plan

Four quick questions. See which Zoho apps fit, how long it takes and what it costs to start.

Step 1 of 4

What kind of business do you run?

Free, no obligation

Looking for a Zoho implementation partner?

Tell us which Zoho app you need help with and where your business is. Hari, our founder, replies within one business day with clear next steps.

Not sure what you need yet? Answer a few plain questions and see your scope and timeline.

Which Zoho app?
What do you need?

We work with clients worldwide over video, and travel to meet you in person when the project needs it.

Get a free Zoho audit

30 minutes with a senior Zoho consultant. No obligation.

  • Fixed price in writing
  • Paid by milestone
  • 30 days of free fixes after go-live
  • Registered Zoho partner

Frequently asked questions

What language do Zoho Flow custom functions use?

Deluge, Zoho's scripting language. You write it in the custom function editor inside the Zoho Flow builder.

Which Zoho Flow plans include custom functions?

Zoho's pricing page lists custom functions on the Standard and Professional plans.

Can a Zoho Flow custom function call an external API?

Yes, with the invokeURL task and a connection. Zoho says connections work only with invokeURL, not with predefined integration tasks.

What data types can a Zoho Flow function return?

void, int, float, string, bool, date, map, list or file. Inputs support the same types except void.

Who can edit Zoho Flow custom functions?

Any member of the organisation can edit or delete a custom function, and changes affect every flow that uses it.

Related

Book a free 30-minute call
Book a free callWhatsApp