Deluge Zia task

Overview 

The Zia task in Deluge is an AI-powered function that enables you to perform text-based operations directly within Zoho apps. It uses large language models (LLMs), through Zoho’s AI platform, Zia, or external vendors like OpenAI, Gemini, or Anthropic, to understand and generate natural language responses. You can use it for prompt-based completions (e.g., email generation, text rewriting) or for document understanding (e.g., extracting structured data from invoices or contracts).

This task brings the power of generative AI into your Deluge scripts, making Zoho apps smarter and easier to use. Instead of manually handling content-heavy or repetitive work, you can offload it to the Zia task to:

  • Generate, rewrite, or summarize text on demand.
  • Extract information from documents into a structured format.
  • Adapt content for different contexts (formal/informal tone, concise/expanded version).
  • Automate reasoning-heavy tasks without external integrations.

From analyzing documents to generating contextual replies, the use cases are virtually endless, empowering developers and users to extend application workflows with intelligence, all while staying inside the Zoho ecosystem.

Note:  The Zia task must be enabled in your Zoho app before you can use it in any workflow. To enable it: 

  • Go to your Zoho app settings (e.g., Zoho Creator, Zoho CRM).
  • Navigate to Zia Settings.
  • Enable on the Zia task feature and configure any required API access or vendor connections (like OpenAI, Gemini, etc.). 

Configuring in Zoho Creator

  • Navigate to Operations in your Creator account.
  • Click Zia in the Applications card and select the required LLM.
  • Toggle the Enable buttons beside Deluge Zia task option in the Select Features section.

Working of the task

  • The task sends your prompt, context, or document to an underlying LLM (Large Language Model) that is connected to your Zoho service.
  • Depending on the configuration, Zia can process plain prompts (e.g., “Summarize this text”) or files/documents.
  • The LLM generates a response object, which contains both system-level details (status and error) and AI-generated text (response/ response.data).
  • You can parse and use this response in your app’s workflow, such as saving results to a field, triggering an email, or updating relevant records.

For example, in Zoho Creator, using a customer feedback form to get the customer's views on a product. The Zia task can first be used to summarize the feedback into key points, and then to generate a polite, personalized response email. Finally, you can send that email to the customer using the sendmail task.

Response format attributes 

When the Zia task completes it returns a response containing the following attributes. This can be used to extract the information related to the response.

  • response.data - the main content of the message will be the output. It will be in Text format.
  • response.status - success/failure indicator. This will provide a Boolean response, can be used in if else statements.
  • response.error - this will be a Key-value pair which shows the error.

This task returns the response or structured output depending on the input and AI model's interpretation. The main content can be fetched using "response.data" or "response".

Note: The output format depends on the prompt and model used. Some use cases return plain text, while others (like document extraction) may return JSON-like structures.

Syntax

The Zia task follows a simple structure where you provide your request in the form of a prompt, along with optional details like supporting files, context, or parameters. Zia then processes this input through the selected AI model and returns a response that you can use in your workflow.

For example, you might start with a prompt that tells Zia what to do, such as “Summarize the customer’s feedback.” If you also want the AI to look at a document, you can attach a file. To make the output more relevant, you can pass extra context, such as “This is customer support feedback”, so the summary fits that scenario. Finally, you can adjust parameters if you want more control over how the AI responds, for instance, asking for a short, precise answer or a detailed explanation.

The output that comes back can then be used in the rest of your script, like displaying it in a report, storing it in a field, or combining it with another Deluge task such as sending an email.

Best practices

  • Use clear and precise prompts to get accurate responses.
  • Set the "temperature" parameter to the minimum for higher accuracy and fewer incorrect or fabricated outputs (hallucinations).  
response = Zia
[
    message : "<message_prompt>"
    files : <file_name> //optional
    context : "<context>" //optional
    parameters : <param_type> //optional
];

Parameters

ParameterData TypeDescription
<response>KEY-VALUE / TEXTVariable that stores the result returned by Zia task
<message_prompt>TEXTInput prompt for Zia to interpret and respond to. The message should be limited to 1,200K (1,200,000) characters.
<file_name> (Optional)FILEFile name that is to be processed. Allowed file types include: 'jpg', 'jpeg', 'png', 'gif', and 'webp'. For Google AI, the 'pdf' format is also supported. 

The file size should be limited to 5 MB. 

Security tip: Avoid entering any personally identifiable information (PII) or sensitive data, as all uploaded content is shared with the language model for processing. However, when using Zoho’s GenAI model, this data will not be used for any other purpose outside your organization.
<context> (Optional)TEXTProvide an additional message specifying the role to be assumed by the AI for improved clarity and more accurate responses.
<param_type> (Optional)KEY-VALUEConfiguration parameters such as 'temperature', 'top_p', 'top_k', and 'max_tokens' are supported to help generate results.
Note: Configuration parameters are optional settings that let you adjust how the AI task behaves or generates results. They can be used to influence factors such as the level of creativity, the range of possible outputs considered, and how closely the output follows predictable patterns. By changing these values, you can fine-tune the balance between accuracy and diversity of the generated results.
For example, when generating text, increasing the creativity parameter, 'temperature', can produce more imaginative and varied responses, while lowering it ("temperature":0.1) results in more focused and predictable answers. Learn more

Use Case

An organization stores vendor invoices as images in Zoho WorkDrive, but manually reviewing each image to extract details like invoice number and calculate the total amount is tedious and error-prone. This process can be automated by first using the invokeURL task with a WorkDrive connection to fetch the invoice as a file object. The file is then passed to the Zia task with a clear instruction such as “Extract the content from this invoice and calculate the total due if the sales tax is 7%.” Context can be added to guide the model, and parameters can fine-tune the response. 

Zia processes the file and returns the requested details in a structured format, which can be directly used in forms, reports, or further workflows, eliminating manual data entry and improving accuracy. The use cases for the Zia task are virtually endless it enables automation and intelligence across all Zoho apps.

fileResponse = invokeUrl
[
    url : "https://download.zoho.com/v1/workdrive/download/7sd5ld49ee3a6acd441e391d518dbde34ae86"
    type : GET
    connection : "zoho_workdrive_connection"
];
// Convert the response into a file object fileResponse.setFileName("invoice_File.jpg");
// Pass the file to Zia with a clear instruction invoice_details = Zia [ message : "Extract the content from this invoice and calculate the total due if the sales tax is 7%." files : fileResponse context : "You are an expert in invoices" parameters : {"temperature":0.2} ]; info invoice_details;

Examples

Example 1: Email generation based on prompt

Generate email drafts based on user input. The context ensures tone and style remain consistent.

//Generate an email based on the message
email = Zia
[
  message : "Write a follow-up email thanking the client for their feedback on the demo session.",
  context : "You are a polite sales representative",
];
info email;

Example 2: Summarize a text from a file (only in Google AI)

Retrieve the meeting notes, convert them to a file, and also summarize the main points.

//Fetch the meeting notes
meetingNotes = invokeurl
[
    url :"https://example.com/meeting_notes.txt"
    type :GET
];
notesFile = meetingNotes.toFile("notes.pdf");
//Generate a summary of the notes summary = Zia [ message : "Summarize the key points from this meeting.", files: notesFile, context : "You are a meeting assistant", ]; info summary;

Example 3: Summarize a file uploaded via a form (Zoho Creator only)

This example shows how to extract structured project details from a file uploaded via a Zoho Creator form using the Zia task.

// Extract key details such as milestones, deadlines, and responsible persons
details = Zia
[
    message : "Extract the milestones, deadlines, and assigned persons from this project report.",
    files : input.Project_Report_File,
    context : "You are a project management assistant"
];
info details;

Response format 

This script fetches a file from a URL, sends it to the Zia task for summarization, and returns the AI-generated summary along with execution details.

responseFile = invokeurl
[
    url : "https://api.thesecretariat.in/the-secretariat-api//public/file/download-content-attachment?fileId=24ce6c0fb65f41abb6ed9bac1b1fb9d5"
];
response = zia
[
    message: "Summarise the data given",
    files : responseFile
];
info response;
Response

The AI summarizes the content of the file: 

The chart illustrates the growth of India's Gross Domestic Product (GDP) in terms of Rs crore from 1950 to 2023, with a base year of 2011-12. The data shows a significant increase in GDP over the decades, with the following key points: - In 1950, the GDP was 4,96,848 Rs crore. - By 2023, the GDP had grown to 1,73,81,722 Rs crore, marking a substantial increase. - The growth rate, indicated by the blue bars, shows fluctuations over the years. For instance, the growth rate was 48.3% between 1950 and 1960, 47.8% between 1960 and 1970, and so on. - The chart highlights a period of rapid growth between 2010 and 2020, with a growth rate of 65.0% between 2010 and 2020. - The most recent data point, for 2023, shows a growth rate of 26.9%. The chart is sourced from the Reserve Bank of India (RBI) and published by the Secretariat.
Accessing response attributes

You can extract further information about the execution and AI output using the response attributes:

info response.status;  // Check if the task executed successfully

These attributes help you verify execution, handle errors, and track which model generated the output, while the main AI summary is available in the response itself. 

Points to note 

  • Each prompt can contain up to 1,200,000 characters.

  • The Zia task accepts different file types depending on the AI provider.

    • Common: jpeg, png, gif, webp

    • Google-specific: jpeg, png, gif, webp, pdf

  • The size of each image sent with a prompt must not exceed 5 MB.

  • You can include only one image per prompt for processing.

  • The task will time out if a response is not received within 40 seconds.

  • The Zia task is subject to throttling based on the number of API calls made within a specific time period when using Zoho GenAI. If this limit is exceeded, subsequent requests may be delayed or temporarily restricted until usage returns to normal. In Creator, the throttling limits are set to 7 simultaneous in-flight requests per user and 10 per organization.

Related Links