Beam Help
Get help now

How-to · Zoho CRM

How to retrieve functions in Zoho

Fetch custom functions and configurations programmatically.

Retrieving functions in Zoho CRM lets you locate, review, and reuse custom logic already deployed in your organisation — saving time and avoiding duplicate code across automations.


Why this matters


When your team builds automations, workflows, or integrations, custom functions accumulate quickly. Being able to retrieve and inspect those functions means you can audit logic before triggering it, invoke one function from inside another, and pass the correct parameters without guesswork. This is especially relevant when connecting Zoho CRM to external services or other Zoho products. As independent expert support (not official Zoho support), Beam Help walks you through the key steps below.


Step-by-step


Step 1. Navigate to the Functions settings area inside your Zoho application. For Zoho CRM, go to Setup → Developer Space → Functions. This lists all custom functions available in your account, including standalone ones that can be called externally. [1]


Step 2. Identify the function you want to retrieve. Each function has a unique name (for example, createcontact1) that forms part of its execution endpoint. Make a note of this name — you will need it to invoke or inspect the function programmatically. [1]


Step 3. To retrieve or invoke a function from within another function, use the invokeurl Deluge task. Construct the request pointing at the function's execution endpoint. For Zoho FSM the pattern looks like:


rest = invokeurl
[
  url: "https://fsm.zoho.com/fsm/v1/functions/<function_name>/actions/execute?auth_type=oauth"
  type: GET
  parameters: {"Last_Name":"Robins","Email":"lucy.robins@zylker.com"}
  headers: Map()
  connection: "fsm"
];
return rest;

Adapt the base URL and connection name to match your Zoho CRM environment. [1]


Step 4. Authenticate the request correctly. Standalone function calls require OAuth. You will need a valid Access Token obtained from https://accounts.zoho.com/oauth/v2/token, and the scope must include the appropriate functions permission (for example, ZohoFSM.settings.functions.CREATE in FSM — check the equivalent CRM scope in your developer console). [5]


Step 5. Examine the response payload. When the function executes successfully, any info log messages your function emits are returned under the userMessage key, while the actual return value of the function appears under the output key. Use these keys to verify the function ran as expected and to extract the data you need. [5]


Step 6. If you need to call the function from a workflow automation rather than another function, you can wire it up through a Custom Function workflow action. Inside the Deluge editor for that action, use the same invokeurl pattern above, supplying the correct URL, HTTP method (GET or POST), parameters, and connection name. [7]


Step 7. To manage the function after retrieval — for instance to edit its logic, clone it for a new use case, or remove an outdated version — return to the Functions list in Setup and use the inline action menu next to the function name. Options available include Edit, Delete, and Clone. [1]


Common pitfalls


  • Wrong HTTP method for your input type. Parameters can be passed via GET (appended to the query string) or POST (in the request body). Mixing these up causes the function to receive empty inputs. Always match the method to how your function reads APIRequest. [5]
  • Missing or incorrect OAuth scope. If the access token was generated without the required functions scope, the API call will be rejected. Regenerate the token with the correct scope before retrying. [5]
  • Invoking a function that is not standalone. Only functions explicitly published as standalone can be called via the external URL pattern. Workflow-only functions are not reachable this way. [1]
  • Multiple search inputs in fetch actions. When retrieving records as part of a function's logic, providing too many unique field inputs can produce unexpected AND/OR matching behaviour. Use the minimum number of unique fields needed to identify a record. [8]

What to check


  • Confirm the function name in the URL exactly matches the name shown in the Functions list — a single character difference will return a 404. [1]
  • Verify the output key in the response contains the expected return value before building downstream logic that depends on it. [5]
  • Ensure the OAuth connection referenced in the connection parameter of invokeurl is active and has not expired or been revoked. [7]

Sources cited

  1. [1] Zoho FSM | Standalone Functions
  2. [2] server.py: chat_plan_stream
  3. [3] server.py: chat_plan
  4. [4] server.py: chat_stream
  5. [5] Building extensions #4: Integrating Zoho Books with applications using connections
  6. [6] FAQs on Zoho Flow
Retrieve Functions | Beam Help