Choose where you’d like to start


 

File data type

Overview

Recognizing the importance of files in Zoho products, Deluge implements FILE as a unique type of data. Files in Deluge must be fetched from the web or cloud service. It doesn't operate on offline files. There are several built-in functions called File functions that operate on FILE datatype. The following are the ways you can bring files into Deluge scripting:

  1. Use invoke URL or get URL to fetch files from web.
  2. Use invoke URL to fetch files stored in any Zoho or third-party services.
  3. Use integration tasks that return a file as response. Example: zoho.writer.mergeAndDownload
  4. Use Zoho Creator fetch record task or input.<expression> to fetch values uploaded in file type fields like "file upload", "image", "video", "audio", and "signature" fields. This is applicable only for Zoho Creator.

Irrespective of the format, all the files fetched using any of the above-mentioned methods, except the "fetch records" task and "input" keyword, are treated as file objects (or FILE data type).

For example, be it a .pdf format file or a .jpeg format file, both are categorized under FILE data type. The files fetched using the "fetch records" task and "input" keyword are not considered as FILE data type, and hence file functions cannot be applied on them. However, such files can be used in integration tasks (for example in attach file crm task), or in the send mail task to send as a file attachment, or to assign the file as a value to another Zoho Creator file field.

Example 1: Fetch files using invokeUrl task

// to fetch file from the cloud using invokeUrl task
  file_variable  =  invokeUrl
  [
   url: "https://sample-videos.com/img/Sample-png-image-100kb.png"
   type: GET
  ];

Where:

file_variable
is the FILE variable which holds the fetched file.
"https://sample-videos.com/img/Sample-png-image-100kb.png"
is the TEXT that represents the URL of the file that needs to be fetched
 

Example 2: Integration with Zoho Sign

The following script downloads the specified document from Zoho Sign using its request ID:

file_variable  =  zoho.sign.downloadDocument(2131000000002069);

Where:

file_variable
is the FILE that represents the downloaded file.
2131000000002069
is the NUMBER that represents the request ID of the document that will be downloaded.
 
Note: 
  • See this page to find the built-in functions applicable to Number data type.

Related Links

Get Started Now

Execute