• HOME
  • Guides
  • What are custom functions in Zoho Flow and how to use them

What are custom functions in Zoho Flow and how to use them

  • Last Updated : February 12, 2024
  • 358 Views
  • 6 Min Read

Zoho Flow is an integration platform that helps businesses get the most out of their SaaS applications by providing them with the opportunity to bring those applications together via integrations. With more than 850 applications in our gallery and the dynamic drag-and-drop builder that makes building integrations easy, you can get the most out of your SaaS applications using Zoho Flow.

While Zoho Flow's integration capabilities can make your applications work better and do more, you can expand your automation possibilities with one of our premium features—custom functions.

What are custom functions?

Zoho Flow lets you write Deluge code to create custom functions that can help you achieve complex workflows specifically for your requirements. Every application in Flow has a limited number of functions they can perform using triggers and actions—but with custom functions in the picture, this limitation can be extended, customizing the flow in the way you want, to get whatever result you're looking for.

For example, if you want to move information from one application to another, but you want it in a different format, custom functions are the solution. An integration platform can help with the data transfer, but when you want to change the format, there may not be triggers or actions for that. This is where custom functions can help.

Zoho Flow requires absolutely no code to build basic flows, but with a little coding knowledge to help you build custom functions, this low-code platform can become an even more compelling tool for automating most of your manual work.

When do you need custom functions? 

Custom functions can be used in almost any situation to achieve a desired outcome. Here are a few examples of situations where using custom functions is the best option for your workflow.

  • Required triggers or actions not available

If you have an idea of what you need to do, but the triggers and actions available aren't enough to make the workflow happen, custom functions should be your go-to. However, if you want to just transfer data from a third-party application that's missing from Zoho Flow's gallery, you won't necessarily need a custom function—you can usually make it happen with a webhook trigger.

Example: When you want to extract emails from application forms, use custom functions. But when you want to transfer information from third-party applications like Mercurial SCM to Zoho apps, use webhooks.

  • Data format conversion

If you want to convert the format of the data you're moving from one application to another, you can use custom functions.

Example: Time zone changes or currency conversions

  • Calculations

If there are any kind of calculations involved in your workflow, you can bring in custom functions to make them happen.

Example: Your e-commerce site has a few items on discount and you want the discounted amount to be calculated in your workflow for invoice-related purposes

  • Line items or subforms

If you want to transfer line items or data within sub-forms to other applications, you can use custom functions.

Example: You want to parse details from a form which contains one or more subforms

  • Comprehensive automated workflows with logical functions

If you're building a huge automated workflow with multiple applications and are looking for an easier way out than building native integrations, your automated workflow will require custom functions. However, this will require a lot of coding knowledge.

Example: Inventory or survey management workflows, automating the assigning of tasks/bugs, and more

These are just a few basic situations where a custom function will be necessary. Later in this article, we'll talk about some use cases where custom functions have a considerable role to play.

How to build custom functions using Zoho Flow 

Custom functions require you to write code and bring them into your flow to make them work. While creating a flow, once you set up your trigger and decide that you need custom functions, look for the Custom Functions section under Logic on the left side. Then click +Custom Function to write your custom function, or go to Settings > Custom Functions, and click Create Custom Function.

 

 

Once you provide the required data, write the code in the script-writing tool that appears once you click the Create button. After writing the code, your custom function will be ready to use in the builder.

 

 

Please note that the custom functions feature is not available for free users.

While the possibilities to include custom functions in your workflows are infinite, here are some of the most common and popular use cases:

Add discounted prices to your finance applications

Let's say you want to build an integration that records a sale you've made on Shopify into your Zoho Books account. This will be a simple integration that can connect these two applications.

Now, let's throw in a bit of complication to the equation. You've decided to provide a discount on the sale of certain products for a week. Since the records on Shopify directly get uploaded into Zoho Books with this integration, you won't be able to also use it for discounted products.

Here's where custom functions come in handy—you can write code that calculates the discount percentage before uploading the record into Zoho Books, and then place it between Shopify and Zoho Books in the builder. Now, every time a sale is made, the discount value of the order will also be calculated before being entered as a record in your Zoho Books account, helping you manage your finances much better.

Transfer information within sub-forms without the hassle

The forms you create for lead generation or lead nurturing won't always be simple, like cases where you need to add sub-forms to your form. Now, creating sub-forms might not be the hardest of tasks, but for a computer to read a form within a form and extract data from it isn't simple. It requires specific information to extract data from the sub-forms, and that's where custom functions can help.

If you're creating a form that has a sub-form using an application, like Zoho Forms and want to back that data up in Google Sheets, bringing in a custom function that can read sub-forms in between the Zoho Forms-Google Sheets integration can do the trick. This way, you can automatically upload information from your forms to Google Sheets, despite the presence of a sub-form.

Send appointment reminders with accurate date and time information

While event reminders are always useful for your leads or customers, providing them an accurate timeline makes things even better. Let's say that a person fills in a registration form for an appointment and selects a suitable date and time. You can build a simple integration that connects your event application and messaging applications like Zoho Cliq, to ensure that they get a notification once they register. You can even take this one step further by setting up a delay function and sending them a reminder a day or two before the event takes place.

But what if you want to let your lead know exactly how much time they have left for the appointment? Situations like these are when custom functions can be helpful. With a custom function in place, the date-time value from the specified appointment date can be subtracted, and a notification can be sent to the person with the days or hours remaining for the appointment, making your reminders even more accurate.

Extract email addresses from forms

One of the most efficient means of generating leads is through forms. Whether it's a sign-up form on a website or a registration form for a webinar, email address is definitely a mandatory field when it comes to collecting lead information. However, when a lead fills out a form with their email address, applications tend to take the address as a whole, rather than breaking it into useful fragments.

When a form comes through with email addresses of employees, integration platforms might not be able to extract the company name or the user name from the email addresses provided in the forms—but a custom function to extract either side of the "@" in the email address can help you do that. This will extract the company name or the user name from the email address in the attendee data, which can later be used for email campaigns or other marketing purposes.

 

These are just a few instances where custom functions can be useful for building automated workflows. But there are many other situations where using custom functions can help you build even complex workflows that can help you automate and streamline numerous sets of tasks.

Sign up today and start building integrations in Zoho Flow!

Related Topics

  • Sooraj

    Content writer for Zoho Flow. Ardent fan of sports and movies.

Leave a Reply

Your email address will not be published. Required fields are marked

By submitting this form, you agree to the processing of personal data according to our Privacy Policy.

You may also like