How to transfer files from Creator file upload fields to CRM file upload fields

How to transfer files from Creator file upload fields to CRM file upload fields

This article describes how to transfer files from Zoho Creator file upload fields to Zoho CRM file upload fields. I'm posting it here because the current documentation does not fully and accurately describe how to do this with certain file types (PDF, in my case), and I was only able to get it working after a lot of troubleshooting and back-and-forth with Creator support.

If you try to transfer a PDF from a Creator record to a CRM file upload field, you may encounter one the following:

  • The file arrives in CRM blank or corrupted
  • The file size is larger than the original (a 14KB file becoming 23KB is a telltale sign)
  • Every step of your pipeline returns a SUCCESS response, making the bug nearly impossible to locate
  • The documentation describes functions that either don't exist in Creator or explicitly warn that they don't work for binary files
  • A script that works for a CSV file fails for a PDF file

Here's how to make it work.


The Objective

Transfer a file uploaded via a Zoho Creator form field into a file upload field on a Zoho CRM record, preserving the file intact.


The obvious approach is to download the file from Creator using invokeUrl, convert it to a file object using toFile(), upload it to the CRM file store, and then update the CRM record with the resulting file ID. This approach is described in Zoho's documentation and appears to work, as every step returns a success response, but produces a blank or corrupted file in CRM for any binary file type, including PDFs.


The root cause is that toFile() does not faithfully round-trip binary data through Deluge's runtime. For plain text files like CSVs, this isn't a problem. For binary files like PDFs, toFile() corrupts the content during conversion. The size inflation (original file smaller than the CRM version) is the diagnostic signature of this corruption.


The documentation offers several apparent alternatives:

getFileContent() returns TEXT and explicitly warns in a footnote that "file types that usually contain images (for example .pdf, etc.) will return junk values." 

setFileType() is documented as applicable to all Zoho services except Zoho Creator, making it useless in this context.


The Missing Documentation

The solution differs depending on whether you are transferring a text-based file (CSV, TXT) or a binary file (PDF).

For Text-Based Files (CSV, TXT): Use the v5 Endpoint with toFile()

For plain text files, the standard pipeline works correctly. Use toFile() to convert the invokeUrl response, POST to the v5 CRM files endpoint, and update the record using zoho.crm.updateRecord.

  1. fileContent = invokeurl
  2. [
  3.     url :"https://www.zohoapis.com/creator/v2.1/data/<owner>/<app>/report/<ReportName>/<recordId>/<FieldName>/download"
  4.     type :GET
  5.     connection:"creator"
  6. ];
  7. fileName = "contacts.csv";
  8. fileObject = fileContent.toFile(fileName);
  9. fileObject.setParamName("file");
  10. uploadResponse = invokeurl
  11. [
  12.     url :"https://www.zohoapis.com/crm/v5/files"
  13.     type :POST
  14.     files:fileObject
  15.     connection:"z_oauth2"
  16. ];
  17. fileId = uploadResponse.getJSON("data").get(0).getJSON("details").getJSON("id");
  18. fileList = List();
  19. fileList.add(fileId);
  20. updateMap = Map();
  21. updateMap.put("Your_File_Field_API_Name", fileList);
  22. zoho.crm.updateRecord("Your_Module", crmRecordId.toLong(), updateMap, Map(), "zcrm");


For Binary Files (PDF): Use the v8 Endpoint with setParamName()

For binary files, skip toFile() entirely. Call setParamName() directly on the invokeUrl response object, POST to the v8 CRM files endpoint, and update the record using a raw invokeUrl PUT with the File_Id__s map structure. The zoho.crm.updateRecord method does not work for v8 file field updates.

  1. fileContent = invokeurl
  2. [
  3.     url :"https://www.zohoapis.com/creator/v2.1/data/<owner>/<app>/report/<ReportName>/<recordId>/<FieldName>/download"
  4.     type :GET
  5.     connection:"creator"
  6. ];
  7. fileContent.setParamName("file");
  8. uploadResponse = invokeurl
  9. [
  10.     url :"https://www.zohoapis.com/crm/v8/files"
  11.     type :POST
  12.     files:fileContent
  13.     connection:"z_oauth2"
  14. ];
  15. fileId = uploadResponse.getJSON("data").get(0).getJSON("details").getJSON("id");
  16. fileMap = Map();
  17. fileMap.put("File_Id__s", fileId);
  18. fileList = List();
  19. fileList.add(fileMap);
  20. fileUpdateMap = Map();
  21. fileUpdateMap.put("Your_File_Field_API_Name", fileList);
  22. dataList = List();
  23. dataList.add(fileUpdateMap);
  24. payload = Map();
  25. payload.put("data", dataList);
  26. updateResponse = invokeurl
  27. [
  28.     url :"https://www.zohoapis.com/crm/v8/Your_Module_API_Name/" + crmRecordId
  29.     type :PUT
  30.     parameters:payload.toString()
  31.     connection:"zcrm"
  32. ];

Validating File Types Before Submission

Since the two file types require different pipelines, it is worth validating the file extension before the on-submit script runs. In Zoho Creator, alert and cancel submit are only valid in validate scripts, not on-submit scripts. Add a validate script to your form with the following pattern:

  1. if(input.Your_CSV_Field != "")
  2. {
  3.     filePath = input.Your_CSV_Field.toString();
  4.     fileExt = filePath.subString(filePath.lastIndexOf(".") + 1).toLowerCase();
  5.     if(fileExt != "csv")
  6.     {
  7.         alert "This field requires a CSV file. Please remove the current file, attach a CSV file, and resubmit.";
  8.         cancel submit;
  9.     }
  10. }
  11. if(input.Your_PDF_Field != "")
  12. {
  13.     filePath = input.Your_PDF_Field.toString();
  14.     fileExt = filePath.subString(filePath.lastIndexOf(".") + 1).toLowerCase();
  15.     if(fileExt != "pdf")
  16.     {
  17.         alert "This field requires a PDF file. Please remove the current file, attach a PDF file, and resubmit.";
  18.         cancel submit;
  19.     }
  20. }

The .toLowerCase() call on the extension is important -- without it, a file named Report.PDF would pass validation on some systems and fail on others.


Connection Setup

This pipeline requires three connections:

  • creator -- used for the invokeUrl GET to download the file from Creator. This is the built-in Zoho Creator connector in Microservices > Connections
  • z_oauth2 -- used for the invokeUrl POST to upload the file to the CRM file store; requires scopes ZohoCRM.bulk.ALL and ZohoCRM.bulk.READ. This is the OAuth2 connection type.
  • zcrm -- used for the invokeUrl PUT to update the CRM record (v8 PDF pipeline) or zoho.crm.updateRecord (v5 CSV pipeline). This uses the built-in Zoho CRM connection type.

Summary

File Type
Download Method
Upload Endpoint
Update Method
CSV / TXT
invokeUrl + toFile()
v5 /crm/v5/files
zoho.crm.updateRecord
PDF
invokeUrl + setParamName()
v8 /crm/v8/files
invokeUrl PUT with File_Id__s

I was not able to find documentation that explains the distinction between v5 and v8 and the requirement to skip toFile() for binary files in Zoho's official documentation at the time of writing. This pipeline was identified through direct testing and a support escalation with Zoho Creator support.


Hope this saves someone a few hours. If Zoho has updated their documentation to cover this since this was posted, please add a comment.

    Access your files securely from anywhere

          All-in-one knowledge management and training platform for your employees and customers.






                                Zoho Developer Community




                                                      • Desk Community Learning Series


                                                      • Digest


                                                      • Functions


                                                      • Meetups


                                                      • Kbase


                                                      • Resources


                                                      • Glossary


                                                      • Desk Marketplace


                                                      • MVP Corner


                                                      • Word of the Day


                                                      • Ask the Experts



                                                                • Sticky Posts

                                                                • Share your success story

                                                                  We would like to hear from our passionate users how much Zoho Creator has changed the way you work and benefited you. If you would like to share your story to us and be featured as a proud user of Zoho Creator, then this is for you. Fill up the form below and if you want to be included in a case study, we will get in touch with you to get further details. So what are you waiting for? Tell us your story. Charles
                                                                • Merge and Store v1 API depreciation

                                                                  Hi Zoho Writer users, The Merge and Store v1 API allows you to store the merged document in Zoho WorkDrive. The response of this API will be returned with the document's ID only after the merge is complete. In Deluge, the maximum timeout for operation
                                                                • Zoho Creator Developer's Conference 2017 !!!

                                                                  We welcome all our Creator Developers! You're invited to join us for our annual Zoholics Developers conference August 29th–31st! This is your chance to get training and guidance on Zoho Creator from our most knowledgeable custom app builders.       Zoholics Developers is a three-day event where you'll participate in interactive workshops to hone your app-building skills, get questions answered by Creator experts with personal one-on-one sessions, and connect with other Creator developers from around


                                                                Manage your brands on social media



                                                                      Zoho TeamInbox Resources



                                                                          Zoho CRM Plus Resources

                                                                            Zoho Books Resources


                                                                              Zoho Subscriptions Resources

                                                                                Zoho Projects Resources


                                                                                  Zoho Sprints Resources


                                                                                    Qntrl Resources


                                                                                      Zoho Creator Resources



                                                                                          Zoho CRM Resources

                                                                                          • CRM Community Learning Series

                                                                                            CRM Community Learning Series


                                                                                          • Kaizen

                                                                                            Kaizen

                                                                                          • Functions

                                                                                            Functions

                                                                                          • Meetups

                                                                                            Meetups

                                                                                          • Kbase

                                                                                            Kbase

                                                                                          • Resources

                                                                                            Resources

                                                                                          • Digest

                                                                                            Digest

                                                                                          • CRM Marketplace

                                                                                            CRM Marketplace

                                                                                          • MVP Corner

                                                                                            MVP Corner









                                                                                              Design. Discuss. Deliver.

                                                                                              Create visually engaging stories with Zoho Show.

                                                                                              Get Started Now


                                                                                                Zoho Show Resources

                                                                                                  Zoho Writer

                                                                                                  Get Started. Write Away!

                                                                                                  Writer is a powerful online word processor, designed for collaborative work.

                                                                                                    Zoho CRM コンテンツ





                                                                                                      Nederlandse Hulpbronnen


                                                                                                          ご検討中の方




                                                                                                                  • Recent Topics

                                                                                                                  • SMTP outgoing problem

                                                                                                                    Hello I have a website where the SMTP email is connected through Zoho Mail SMTP. Today I am no longer receiving emails from the website. Joomla shows that the email was sent successfully, but I do not receive it.
                                                                                                                  • Fiscal year setting

                                                                                                                    Hi, I am looking into using Zoho Books. I cannot understand the organisation fiscal year setting. Our fiscal year runs from 1 April to 31 March. In the organisation profile, I need to set Fiscal Year to “April to March” and Start Date to “2” for the period
                                                                                                                  • Issue with payments on invoices

                                                                                                                    Hello, I’m having the following issue. When I create an invoice and try to apply a partial payment in a single transaction, the system does not allow it — it only allows full payment. Is this the expected behavior, or am I missing some configuration?
                                                                                                                  • auto add as member the contact owner

                                                                                                                    is there a way that i can make a zoho flow that will add the owner of the contact as a member of the chat after the round robin assignment?
                                                                                                                  • Welcome to Zoho CommunitySpaces

                                                                                                                    Hello everyone, This is your space to ask questions, share ideas, and connect with others building and growing their own communities. For those new here, Zoho CommunitySpaces is a platform for building and managing online communities—from discussion spaces
                                                                                                                  • Announcing new features in Trident for Windows (v.1.20.4.0)

                                                                                                                    Hello Community, Trident for Windows is here with some new features to elevate your work experience. Let's take a quick look at what's new. Export emails. You can now export emails in the .eml file format as compressed zipped files to create a secure
                                                                                                                  • Announcing new features in Trident for Windows (v1.14.5.0)

                                                                                                                    Hello Community, Trident for Windows is here with new features to elevate your workplace productivity. Let's take a quick look at what's new. Add and edit contacts Previously, you could view all of your personal and organizational contacts in Trident.
                                                                                                                  • Announcing Trident desktop app for Zoho Mail & Zoho Workplace users

                                                                                                                    Hello Community, I hope you are doing well and staying safe. As you know, our Mail & workplace teams have been constantly working on adding more value to our offerings to ensure you and your organization continue enjoying your Zoho experience. As part
                                                                                                                  • Quick way to add a field in Chat Window

                                                                                                                    I want to add Company Field in chat window to lessen the irrelevant users in sending chat and set them in mind that we are dealing with companies. I request that it will be as easy as possible like just ticking it then typing the label then connecting
                                                                                                                  • Please Remove the Confirmation Popup

                                                                                                                    Currently, every time a recruiter changes the status of a candidate in Zoho Recruit, a popup confirmation appears that requires clicking “OK, Got it” before proceeding. This creates unnecessary friction in the workflow, especially for users handling high
                                                                                                                  • Team Module Issues?

                                                                                                                    We are testing Team Licenses for use by our Customer Service staff. I created a Teamspace called CSR and only assigned two users to this space: Administrator (me) and “Team License Test.” Team License Test is assigned to the Team User profile, with a
                                                                                                                  • Announcing new features in Trident for Windows (v.1.41.5.0)

                                                                                                                    Hello Community! Trident for Windows just received an exciting update with new ways to collaborate and stay organized without leaving your workspace. Let’s take a look at what’s new! Integrate Zoho Meeting with Trident. You can now schedule, start, and
                                                                                                                  • Zoho ERP | Product updates | June 2026

                                                                                                                    Hello users, We launched Zoho ERP on January 23, and since then, our goal has been to help businesses streamline and manage their operations with greater efficiency, flexibility, and control. Since the launch, we've continued to enhance the platform every
                                                                                                                  • Zia Agent activation in Zoho Desk forces new Organization creation instead of deploying to existing one

                                                                                                                    While attempting to complete the deployment and activation sequence of a new Zia Agent within our existing Zoho Desk environment, the activation process failed on the user interface, throwing a generic error (see print). However, despite the activation
                                                                                                                  • Allow native Webhooks to authenticate via Connections

                                                                                                                    Allow native Webhooks to authenticate via Connections (Basic Auth) instead of plaintext custom headers Summary Please allow native Webhooks (Workflow Rules > Instant Actions > Webhooks) to authenticate against the destination endpoint using the existing
                                                                                                                  • How do page versions work these days?

                                                                                                                    I thought that Zoho Wiki had the capability to display previous versions of a page, and optionally reinstate them. But I can't find a current doc on this subject -- is there one? From what I remember, that capability was accessed via the Version number
                                                                                                                  • Warehouse -> Locations Transition Causing Errors

                                                                                                                    After saying "okay" to the transition from 'warehouses' to 'locations', I've now got shipped Sales Orders that I cannot invoice. How does one proceed?
                                                                                                                  • Problem with the blueprint flow.

                                                                                                                    Scenario: 3 departments in a single environment: A-B-C agents from department 1 D-E-F agents from department 2 G-H agents from department 3 Since we've been using Zohodesk (2023), agents can assign tickets to the correct department using the blueprint
                                                                                                                  • Introducing the new Zoho Announcements Hub

                                                                                                                    Hello, Enterprise Support Community! We are excited to announce a new way to keep up to date with recent product releases and announcements for the Zoho apps you use on a regular basis. Introducing our new centralized location to bring together all Zoho
                                                                                                                  • Ability to run report over 180 days

                                                                                                                    Is there a reason Zoho limits the ability to run reports for records older than 180 days? In my view, the only reason I can think of is that it forces us to pay for Advanced Analytics (which I do).
                                                                                                                  • Cloning a View

                                                                                                                    When I clone a View, it doesn't make a copy; it only creates a new copy with the same default fields as if I were creating a new view. What is the purpose of cloning if it doesn't bring in the same fields? Thanks Rudy
                                                                                                                  • New tickets with empty image contents

                                                                                                                    Dear Support. From the end of last week onwards customers send messages for new tickets through microsoft graph (by email to support at procert.ch using the procert portal). We have an issue with the emails because well packed images are no longer visible.
                                                                                                                  • Images not showing up in Desk tickets

                                                                                                                    Customers are trying to send us screenshots to diagnose their issues. But Desk seems to be stopping the images/breaking the link when the ticket comes in. (We can see them in an email box getting cc'd on all tickets...so it's not our mail system). Help!
                                                                                                                  • Introducing Databridge for Zoho Creator

                                                                                                                    Hello, Enterprise Support Community! We'd like to highlight a recent utility that was released for Zoho Creator, that will allow you to connect external, private datasources with your Creator apps, Databridge. Databridge is an application that will need
                                                                                                                  • Zoho HTML editor is removing MSO (Outlook) specific code.

                                                                                                                    The ability to add in custom HTML is great. We are using MJML to generate our wonderfully cross platform and responsive email code that works on Act-On, Salesforce, Hubspot, Active Campaign, and lead liaison. The way it supports MSO (Outlook) is it included
                                                                                                                  • Retail Payment Receipt

                                                                                                                    Hi, So "payment receipts" have a "Retail" template for thermal printers, but the template is configured at A4 paper size!!! How is this retail guys? On the other hand, Invoices have 3 Retail templates which have 3 and 4 inch paper size, perfectly fitting
                                                                                                                  • Custom Portal URL causing SAMEORIGIN error with embedded Page snippet

                                                                                                                    In my app, I have a page that embeds another page. The URL that I have for the embedded page starts with https://creatorapp.zoho.com but the custom domain I have set up is https://kors.kerndell.com. Because the user logged into the app at https://kors.kerndell.com,
                                                                                                                  • Pasting images is a mess

                                                                                                                    I’m trying to paste images into my tickets, in the comments field. But when I paste images, they end up in the wrong order or behind the text.
                                                                                                                  • Sort by Project Name?

                                                                                                                    How the heck do you sort by project name in the task list views??? Seems like this should be a no-brainer?
                                                                                                                  • Zoho Contracts Just Got Better! CRM 2.0, Regional Settings & 6 New Reports

                                                                                                                    Zoho Contracts is evolving to bring you a more efficient and customizable contract management experience. In this update, we are introducing powerful enhancements to our Zoho CRM integration, regional settings, and reports. Let us explore what’s new:
                                                                                                                  • Zoho Finance Limitations 2.0 #5: Can't select "Account Id" if creating Custom Links in Related Panel (but it's available for Custom Buttons)

                                                                                                                    When creating a custom link within the Zoho Finance module there is no option to select the "Account Id". If creating a Custom Button, it's available. Any plans to make this available within a reasonable timeframe? ======== Perspective: using Zoho finance
                                                                                                                  • Zoho Cliq not working on airplanes

                                                                                                                    Hi, My team and I have been having this constant issue of cliq not working when connected to an airplane's wifi. Is there a reason for this? We have tried on different Airlines and it doesn't work on any of them. We need assistance here since we are constantly
                                                                                                                  • Can Zoho CRM Emails be used in Zoho Analytics in any capacity?

                                                                                                                    We're wanting to display details about Lead Activity in regular reports through Zoho Analytics but we're having difficulty integrating Emails at all. We'd like to be able to note when an email is received and when it is sent somewhere other than just
                                                                                                                  • [Free Webinar] New portal page customization in Zoho Creator - Creator Tech Connect

                                                                                                                    Hello everyone, We’re excited to invite you to another edition of the Creator Tech Connect webinar. About Creator Tech Connect The Creator Tech Connect series is a free monthly webinar featuring in-depth technical sessions designed for developers, administrators,
                                                                                                                  • #11 Stop Absorbing Cost That Client Should Pay

                                                                                                                    One of the easiest ways of losing profit in a business isn't losing a customer. It's forgetting to include the expenses that are incurred for half of your customers. A taxi ride to a client location A software subscription purchased for a project. Domain
                                                                                                                  • Related products & AI product recommendations through commerce API.

                                                                                                                    Hello Zoho team I’m looking to add related products and AI product recommendations to my Zoho Commerce webshop with custom storefront. Is this supported through the API? And if not, is this on your roadmap? Thanks in advance David
                                                                                                                  • Can you sell Subscriptions using Zoho Commerce?

                                                                                                                    In addition to physical products and the apparently coming soon 'Digital Products', it is possible to sell Subscriptions using Zoho Commerce?
                                                                                                                  • Zoho Commerce B2B

                                                                                                                    Hello, I have signed up for a Zoho Commerce B2B product demo but it's not clear to me how the B2B experience would look for my customers, in a couple of ways. 1) Some of my customers are on terms and some pay upfront with credit card. How do I hide/show
                                                                                                                  • A method for renaming tab titles in Creator to display more relevant information

                                                                                                                    Hi Zoho Devs, Updates: Rules Export File attached; you can now import this into Tab Modifier instead of manually entering the rules yourself) 2022-06-08: Updated rules so that crm.zoho.com tabs are not affected; uploaded new .json import file 2022-06-09:
                                                                                                                  • Bulk upload images and specifications to products

                                                                                                                    Hi, Many users have asked this over the years and I am also asking the same. Is there any way in which we can bulk upload product (variant) images and product specifications. The current way to upload/select image for every variant is too cumbersome.
                                                                                                                  • Next Page