Tip 27: How to upload files to Dropbox using the Dropbox API in Zoho Creator

Tip 27: How to upload files to Dropbox using the Dropbox API in Zoho Creator

Hi folks, 

It's been a while since our last tip. Hope you're all safe and doing well!

This tip will talk about the Dropbox API that helps you upload files to Dropbox. It's one of the most common actions that you can perform by integrating Zoho Creator and Dropbox. 

To understand how this works, let's create a sample application called File Management App and learn how to upload files to DropBox by adding the Dropbox API to a workflow.

Application flow
  1. The end user will upload a file to the file upload field in a Zoho Creator form.
  2. Once they click the Submit button on the form, the workflow will trigger the Dropbox API and upload the file to your Dropbox.
To do this we need to follow these steps:

  1. Create a form called File Upload in the File Management application, with the following fields:
    1. File Name (Single Line field)
    2. File Upload (File upload field)
  2. Publish the corresponding report to generate the Publish Key.
  3. Create a workflow that uses Dropbox's save URL API to push the uploaded file to Dropbox.
Step 1: Create the File Upload form

First, we need to create the form (as shown in the screenshot below) which we'll use to upload the files into the Creator application.




Step 2: Publish the report

As you're probably aware, for all forms built on Creator, there's an automatic report generated for it. So, for our form, File Upload, a corresponding report has been created. Now, let's publish this report to get the publish key, which will be used to construct the uploaded file's URL.

What is a publish key?

A publish key is a string of characters that Zoho Creator generates to make the report publicly accessible. You'll be able to get the publish key from the permalink of the published report, which is in the below format:

https://creator.zohopublic.com/<workspace_name>/<app_link_name>/report-perma/<report_link_name>/<publish key> 

Step 3: Generate DropBox access token

What is an access token?

Access tokens are used in token-based authentication to allow an application to access an API. In this case, it's a string generated by Dropbox which needs to be included with each subsequent API request to uniquely identify (authenticate) both your app and the end user. 

How to generate an access token for DropBox

You'll need to register your Creator application with Dropbox by creating a new app. That page will guide you through the registration process, specifying the permissions your app needs, and creating an app name.





Now, you can generate an access token for your newly created app by clicking on the Generate button in the OAuth 2
section of your app settings page. 




Step 4: On Success script

Now, let's add a Deluge script to On Success in the form workflow, to push the file that's being uploaded to Zoho Creator to DropBox. We would suggest you use the below syntax on success action on the form. 

    1. //report private key

    2. privatekey = "0v4mapW***************6O2";

    3.  

    4. //DropBox access token

    5.  

    6. dropbox_access_token = "n94**********************pO";

    7.  

    8. // file/folder path in Dropbox where you wish to save the file

    9.  

    10. dropbox_file_path = "/Creator/";

    11.  

    12. //Getting the file name

    13.  

    14. file_name = input.File_Name+input.File_upload.subString(input.File_upload.lastIndexOf("."),input.File_upload.length());

    15.  

    16. //Constructing the file URL

    17.  

    18. fileurl = "https://creatorexport.zoho.com/file" + zoho.appuri + "<report_link_name>/" + input.ID + "/<file_upload_field_link_name>/download/" + privatekey + "?filepath=/" + input.File_upload;

    19.  

    20. url = "https://api.dropboxapi.com/2/files/save_url";

    21.  

    22. headers = "{\"Authorization\":\"Bearer " + dropbox_access_token + "\",\"Content-Type\":\"application/json\"}";

    23.  

    24. data = "{\"path\":\"" + dropbox_file_path +file_name+ "\",\"url\":\"" + fileurl + "\"}";

    25.  

    26. datastring = data.toString();

    27. response = postUrl(url,datastring,headers,false);

The above code will help us upload a file from Zoho Creator to DropBox upon successful form submission in Zoho Creator.

Closing the loop

Note that the postUrl task should complete within 5 minutes, or the operation will time out and the task will fail. Given the likelihood of such scenarios, you shouldn't have any workflows that immediately delete the file or the corresponding record from Creator.

Also, if you want to store files only in Dropbox, we recommend creating a daily or weekly schedule that deletes those records that contain files that were successfully transferred to your Dropbox.

That's an easy tip, isn't it? You should give it a try! And if you run into any difficulties with the process, please comment below and we'll be happy to assist you.


    Access your files securely from anywhere







                          Zoho Developer Community






                                                • Desk Community Learning Series


                                                • Digest


                                                • Functions


                                                • Meetups


                                                • Kbase


                                                • Resources


                                                • Glossary


                                                • Desk Marketplace


                                                • MVP Corner


                                                • Word of the Day


                                                • Ask the Experts





                                                          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 Writer

                                                                                            Get Started. Write Away!

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

                                                                                              Zoho CRM コンテンツ





                                                                                                Nederlandse Hulpbronnen


                                                                                                    ご検討中の方




                                                                                                          • Recent Topics

                                                                                                          • when I email a invoice how can i see it was sent and also were i can go to see all emails sent

                                                                                                            when I email a invoice how can i see it was sent and also were i can go to see all emails sent?
                                                                                                          • Export Invoices to XML file

                                                                                                            Namaste! ZOHO suite of Apps is awesome and we as Partner, would like to use and implement the app´s from the Financial suite like ZOHO Invoice, but, in Portugal, we can only use certified Invoice Software and for this reason, we need to develop/customize on top of ZOHO Invoice to create an XML file with specific information and after this, go to the government and certified the software. As soon as we have for example, ZOHO CRM integrated with ZOHO Invoice up and running, our business opportunities
                                                                                                          • Showing description in timesheet and timelogs.

                                                                                                            I am wondering if it’s possible in version 5 of Zoho People to have the description show by default or with a manipulation on the user’s part. Let me show you what I mean. As you can see this is the view for the users. Now if they want to see the full
                                                                                                          • How can I see content of system generated mails from zBooks?

                                                                                                            System generated mails for offers or invices appear in the mail tab of the designated customer. How can I view the content? It also doesn't appear in zMail sent folder.
                                                                                                          • CRM Blueprint Notification by Cliq

                                                                                                            Dear Zoho team, In Workflow, there is nofication by cliq, but in blueprint, there is no option as cliq notification. I think it is very convenient to get notified by Cliq , as there are multi modules in apps, but we will always check Cliqs
                                                                                                          • Zoho People Attendance Regularization – Wrong Total Hours Displayed

                                                                                                            While using Zoho People, I observed that the attendance regularization is showing wrong total hours when applied to past dates. For example, if a check-in is added at 10:00 AM and check-out at 6:00 PM for a previous date, the system sometimes calculates
                                                                                                          • Sync Contacts in iOS

                                                                                                            What does the "Sync Contacts" feature in the iOS Zoho Mail app do?
                                                                                                          • Live webinar: Craft the ideal sales pitch deck with Show

                                                                                                            Every great sale starts with a great story. And your pitch deck? That’s where the story takes shape. But too often, these presentations end up looking generic, overloaded with text, or lacking structure. The good news is, it's easier to fix than you think!
                                                                                                          • Project Statuses

                                                                                                            Hi All, We have projects that sometimes may not make it through to completion. As such, they were being marked as "Cancelled". I noticed that these projects still show as "Active" though which seems counter intuitive. In fact, the only way I can get them
                                                                                                          • 👋 Welcome to the Zoho MCP Community

                                                                                                            Hello all, glad to have you here! This is your space for everything AI agents, MCP tools, and intelligent business apps. This community is for you — developers, partners, creators, and businesses exploring how agents can transform work. Whether you’re
                                                                                                          • Suitability of Zoho One (Single User License) for Multi-State GST Compliance & Cost Analysis

                                                                                                            Hello Zoho Team, I am an e-commerce business owner selling on platforms like Amazon, Flipkart, and Meesho, and I'm currently using their fulfillment warehouses. I have two GSTIN registrations and am planning to register for an additional 2-3 to expand
                                                                                                          • DNS Manager

                                                                                                            Where Can I find my DNS manager so I can link this to click funnels or AWEBER
                                                                                                          • Forwarder

                                                                                                            Hi, I tried to add a forwarder from which emails are sent to my main zoho account email . However, it asks me for a code that should be received at the forwarder email, which is still not activated to send to my zoho emial account. So how can I get the
                                                                                                          • Forwarder

                                                                                                            Hi, I tried to add a forwarder from which emails are sent to my main zoho account email . However, it asks me for a code that should be received at the forwarder email, which is still not activated to send to my zoho emial account. So how can I get the
                                                                                                          • How do I sync multiple Google calendars?

                                                                                                            I'm brand new to Zoho and I figured out how to sync my business Google calendar but I would also like to sync my personal Google calendar. How can I do this so that, at the very least, when I have personal engagements like doctor's appointments, I can
                                                                                                          • Need to extract date from datetime field

                                                                                                            I have a datetime field and need only the date part from it. I am unable to find a built-in function that would be <DateTime>.Date(). I don't think I want to go the string conversion route of converting the datetime to string and then parsing out values and create a date out of it. Any one out there has a better solution to this? Thanks in adavnce. Regards Moiz Tankiwala Smart Training & IT Solutions
                                                                                                          • How to Hide Article Links in SalesIQ Answer Bot Responses

                                                                                                            I have published an article in SalesIQ, and the Answer Bot is fetching the data and responding correctly. However, it is also displaying the article link, which I don’t want. How can I remove the link so that only the message is shown?
                                                                                                          • New in Cadences: WhatsApp follow-ups, upgraded limits, and options for add-ons

                                                                                                            Hello everyone, We're rolling out two key updates to help you engage better and scale smarter with Cadences in Zoho CRM. Reach customers on WhatsApp, directly from Cadences Previously, Cadences have enabled you to automate follow-ups through emails, calls,
                                                                                                          • additional accounts

                                                                                                            If I brought 5 emails to my account. Can I later buy additional emails.
                                                                                                          • Issue in Zoho People Regularization – Incorrect Hour Calculation

                                                                                                            I have noticed that when applying attendance regularization in Zoho People for previous dates, the total working hours are not calculated correctly. For example, even if the check-in is 10:00 AM and check-out is 6:00 PM, the system shows an incorrect
                                                                                                          • Why I am unable to configure Zoho Voice with my Zoho CRM account?

                                                                                                            I have installed Zoho Voice in my Zoho CRM, but as per the message there is some config needed in Zoho Voice interface. But when I click on the link given in the above message, I get an access denied page.
                                                                                                          • Issue with Hour Calculation in Zoho People Attendance Module

                                                                                                            I have noticed an issue in the attendance regularization feature of Zoho People. When trying to regularize past dates, the total working hours are not calculated correctly. For example, if I enter a check-in and check-out time for a previous day, the
                                                                                                          • Cliq Meeting Calls No Audio and Screen Share

                                                                                                            When in a Cliq channel meeting, the audio does not work at all on pc. When i use my phone as audio source, screen share on pc does not work. I have updated audio drivers but the strangest thing is that during a 1 on 1 call, it works well. Therefore the
                                                                                                          • Bug in Total Hour Calculation in Regularization for past dates

                                                                                                            There is a bug in Zoho People Regularization For example today is the date is 10 if I choose a previous Date like 9 and add the Check in and Check out time The total hours aren't calculated properly, in the example the check in time is 10:40 AM check
                                                                                                          • Work anniversary and birthdays on connect

                                                                                                            Hello, I like the idea of having employee's work anniversary and birthdays on the dashbaord. Do you have to have the employee complete this information themselves in connect settings, or does it pull from their directory settings? (ie. we use Zoho one
                                                                                                          • Alias Email Id already exists

                                                                                                            Hi I'm trying to create an alias : contact @ yoavarielevy.co.il but i get the message  Alias Email Id already exists I had an account with the same name but I deleted it. Can you help? Thanx Yoav
                                                                                                          • BANK FEED - MAYBANK , provider from YODLEE IS NOT WORKING

                                                                                                            As per topic, the provider YODLEE is not working for the BANK FEED. It have been reported since 2023 Q3, and second report on 2023 Q4. now almost end of 2024 Q1, and coming to 2024 Q2. Malaysia Bank Maybank is NOT working. can anyone check on this issue?
                                                                                                          • Feature Request: Ability to Set a Custom List View as Default for All Users

                                                                                                            Dear Zoho CRM Support Team, We would like to request a new feature in Zoho CRM regarding List Views. Currently, each user has to manually select or favorite a custom list view in order to make it their default. However, as administrators, we would like
                                                                                                          • Adding Multiple Products (Package) to a Quote

                                                                                                            I've searched the forums and found several people asking this question, but never found an answer. Is ti possible to add multiple products to a quote at once, like a package deal? This seems like a very basic function of a CRM that does quotes but I can't
                                                                                                          • Zoho Commerce in multiple languages

                                                                                                            When will you be able to offer Zoho Commerce in more languages? We sell in multiple markets and want to be able to offer a local version of our webshop. What does the roadmap look like?
                                                                                                          • Compensation | Salary Packages - Hourly Wage Needed

                                                                                                            The US Bureau of Labor Statistics says 55.7% of all workers in the US are paid by the hour. I don't know how that compares to the rest of the world, but I would think that this alone would justify the need for having an hourly-based salary package option.
                                                                                                          • webinar registration confirmation are landing in SPMA folders

                                                                                                            I am trialing zoho webinar and do not have access to custom domains. When I test user registrations, they are working but the resulting confirmation email is landing in a spam folder. How can I avoid this?
                                                                                                          • Making digital signatures accessible to all: Introducing accessibility controls in Zoho Sign

                                                                                                            Hi there! At Zoho Sign, we are committed to building an inclusive digital experience for all our users. As part of our ongoing efforts to align with Web Content Accessibility Guidelines (WCAG), we’re updating the application with support that will go
                                                                                                          • Is there a way to set Document Owner/Sender via the API

                                                                                                            When sending requests for zoho sign, it would seem zoho uses the id of the person that created the zoho api cred to determine the owner_id, is there a way to set a default for this?
                                                                                                          • Transition Criteria Appearing on Blueprint Transitions

                                                                                                            On Monday, Sept. 8th, the Transition criteria started appearing on our Blueprints when users hover over a Transition button. See image. We contacted Zoho support because it's confusing our users (there's really no reason for them to see it), but we haven't
                                                                                                          • Delegates should be able to delete expenses

                                                                                                            I understand the data integrity of this request. It would be nice if there was a toggle switch in the Policy setting that would allow a delegate to delete expenses from their managers account. Some managers here never touch their expense reports, and
                                                                                                          • Add Save button to Expense form

                                                                                                            A save button would be very helpful on the expense form. Currently there is a Save and Close button. When we want to itemize an expense, this option would be very helpful. For example, if we have a hotel expense that also has room service, which is a
                                                                                                          • Multiple organizations under Zoho One

                                                                                                            Hello. I have a long and complicated question. I have a Zoho One account and want to set it up to serve the needs of 6 organizations under the same company. Some of the Zoho One users need to be able to work in more than 1 organization’s CRM and other
                                                                                                          • Error AS101 when adding new email alias

                                                                                                            Hi, I am trying to add apple@(mydomain).com The error AS101 is shown while I try to add the alias.
                                                                                                          • Unbundle feature for composite items

                                                                                                            We receive composite items from our vendors and sell them either individually or create other composite items out of them. So, there is a lot of bundling and unbundling involved with our composite items. Previously, this feature was supported in form
                                                                                                          • Next Page