Upload CSV

Upload CSV

Hi I would be interested in using the API to submit a CSV file from Google Apps Script. So far, I am using this:

  1.   var url="https://reportsapi.zoho.com/api/xxxxxxxxx/yyyyyyyyyyyyyy/"+tabla;
      var ticket="zzzzzzzzzzzzzzzzz" ;//getTicket();
      url=url + "?ZOHO_ACTION=IMPORT&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=json&ZOHO_API_VERSION=1.0"
      var params={"ZOHO_API_KEY":"vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv"
    //              ,"ZOHO_ACTION":"IMPORT"
    //              ,"ZOHO_OUTPUT_FORMAT":"XML"
    //              ,"ZOHO_ERROR_FORMAT":"XML"
                  ,"ticket":ticket
    //              ,"ZOHO_API_VERSION":1.0
                  ,"ZOHO_FILE":file
                  ,"ZOHO_IMPORT_TYPE":"APPEND"
                  ,"ZOHO_ON_IMPORT_ERROR":"ABORT"
                  ,"ZOHO_AUTO_IDENTIFY":"true"
                  ,"ZOHO_CREATE_TABLE":"false"
                  ,"ZOHO_DATE_FORMAT":"dd-MM-YYYY"
                  ,"ZOHO_DELIMITER":"0"
                 };


      var options =
        {
          "method" : "post",
          "payload" : params,
          "contentType": "multipart/form-data"
        };
      //Logger.log("query:"+query);
      var response=UrlFetchApp.fetch(url, options);

however, I am getting an error:

returned code 500. Server response: { "response":{ "action":"IMPORT", "error":{ "code":7005, "message":"Sorry, an unexpected error occured when performing this operation. The error has been logged and will be looked into.\n\nIt would be of great help if you could provide us with additional information using the \'\'Feedback\'\' link at the top of this page." } } }




                            Zoho Desk Resources

                            • Desk Community Learning Series


                            • Digest


                            • Functions


                            • Meetups


                            • Kbase


                            • Resources


                            • Glossary


                            • Desk Marketplace


                            • MVP Corner


                            • Word of the Day



                                Zoho Marketing Automation


                                        Manage your brands on social media



                                              Zoho TeamInbox Resources

                                                Zoho DataPrep Resources



                                                  Zoho CRM Plus Resources

                                                    Zoho Books Resources


                                                      Zoho Subscriptions Resources

                                                        Zoho Projects Resources


                                                          Zoho Sprints Resources


                                                            Qntrl Resources


                                                              Zoho Creator Resources


                                                                Zoho WorkDrive Resources



                                                                  Zoho Campaigns Resources

                                                                    Zoho CRM Resources

                                                                    • CRM Community Learning Series

                                                                      CRM Community Learning Series


                                                                    • Tips

                                                                      Tips

                                                                    • 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