Using invokeurl to upload files to Google Drive

Using invokeurl to upload files to Google Drive

I'm running into an issue when using invokeurl to attempt to upload files to Google Drive using the Google Drive API v3

When I run the code below I get this error: "Missing end boundary in multipart body"

However, I define the boundary string in the header, and include it in the parameters string.

When I run the same request in Postman, I get a successful response and it creates the file. Postman pics are attached.

How do I need to format this request in Deluge to get it working?

upload_headers = Map();
upload_headers.put("Content-Type","multipart/related; boundary=foo_bar_baz");
// upload_headers.put("Content-Length",file_size);
upload_params = "--foo_bar_baz"+"\n"+"Content-Type: application/json; charset=UTF-8"+"\n"+"{'name':'Zoho_test.txt','parents':['1ZfH6_HIkH1AH5liITcIUqxiR92KzOByY']}"+"\n"+"--foo_bar_baz"+"\n"+"Content-Type: text/plain"+"\n"+"This is a test document."+"\n"+"--foo_bar_baz--";
//Upload PDF HTTP request
upload_PDF_response = invokeurl
url :upload_PDF_url
type :POST
headers: upload_headers
info upload_PDF_response;

    • Sticky Posts

    • Function #41: Sync Associated Subforms!

      Welcome back everyone! The last custom function showed how to update a Contact with Product details from it's Related list in Deals. This week, let's look at a function that lets you update subform records in two modules simultaneously when one of them is updated. Business scenario Let's look at how subform helps in an education institution that has deployed Zoho CRM. National Public School, Austin (made up, of course!) has set up Zoho CRM and it follows the same relationship pattern of "Students",

    Zoho Pagesense Resources

        Zoho SalesIQ Resources

              Zoho TeamInbox Resources

                Zoho DataPrep Resources

                    Zoho CRM Plus Resources

                      Zoho Books Resources

                        Zoho Subscriptions Resources

                          Zoho Desk Resources

                            Zoho Projects Resources

                              Zoho Sprints Resources

                                Qntrl Resources

                                  Zoho Creator Resources

                                    Zoho WorkDrive Resources

                                        Zoho Campaigns Resources

                                          Zoho CRM Resources

                                                      Design. Discuss. Deliver.

                                                      Create visually engaging stories with Zoho Show.

                                                      Get Started Now