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 Campaigns Resources


        • Desk Community Learning Series


        • Digest


        • Functions


        • Meetups


        • Kbase


        • Resources


        • Glossary


        • Desk Marketplace


        • MVP Corner


        • Word of the Day


        • Ask the Experts


          Zoho CRM Plus Resources

            Zoho Books Resources


              Zoho Subscriptions Resources

                Zoho Projects Resources


                  Zoho Sprints Resources


                    Zoho Orchestly Resources


                      Zoho Creator Resources


                        Zoho WorkDrive 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




                            Zoho Writer Writer

                            Get Started. Write Away!

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

                              Zoho CRM コンテンツ



                                ご検討中の方