Invoke URL With Zoho Creator and Multi Part Form Data

Invoke URL With Zoho Creator and Multi Part Form Data

Hi, I have been trying to get an external API working with Zoho creator, I have managed to get loads of different API's working fine over the past few months but I have a problem getting the syntax right for this specific API. I think this is the first time an API I have been connecting to has asked for multipart/form data. I have read the documentation for this a dozen times but as it has notes for one service, do this for another service I can't make any sense of it... I usually manage to use the help and examples to get anything working we need but this one has evaded me. 


The API is Anvil PDF, we are looking to use this service to allow us to send off a modular HTML document constructed in deluge to return a multi-page PDF for quotes, jobsheets etc as we need something a bit more heavy duty than the Zoho Creator Record Templates now and the ability to create more than one page with a proper header and footer.

The JSON object construction works fine and in copy and paste to PostMan it worked.

The API is responding with "required property missing" so I know the API URL and Key are working fine, I just know I'm not  putting then JSON object in the correct place! I have been using PostMan to test this too so I know it all works fine in Postman. My code is below including all my random notes on what is doing what:

  1. void ANVIL.HTML_Generate_Test_RB(int recordID)
  2. {
  3. //Added 18:40 - 11/07/22 - RB
  4. //This is a TEST function to assess the concept of creating a JSON object to send to the ANVIL HTML to PDF API
  5. //The idea is we add HTML to each element on a Jobsheet or similar, then when we want the PDF we simply PULLLL all that data together using code...
  6. //Soooo.... Top Level recordID WILL BE the Jobsheet Form, the various elements will link to HTML snippets...
  7. //Here we go, initially this will just POP the code up for testing, IF it works it will be linked into the Anvil API to return the PDF File, for now I will just copy the code into Postman and do it manually.
  8. //
  9. //Hard coded record ID for testing. 
  10. recordID = 102653000000237355;
  11. //Fetch the Jobsheet we are working with....
  12. jobsheet = Jobsheet[ID == recordID];
  13. //
  14. grabAnvil = Anvil_JSON_Objects[ID == jobsheet.Jobsheet_Templates.Anvil_JSON_Objects];
  15. //Pull Out the Multiline field which holds the JSON object to send off...
  16. grabAnvil_ML = grabAnvil.JSON_Object_Multi_Line;
  17. //info "Multi Line Straight From App: " + grabAnvil_ML;
  18. //Pull the unique CSS reference we inserted so we know where to insert the new CSS
  19. grabCSSREF = grabAnvil.CSS_Insert_Unique_Ref;
  20. //
  21. cssHardcode = "body { font-size: 14px; color: #171717; }.header-one { text-decoration: underline; }.header-two { font-style: underline; }";
  22. //Patch the CSS into the CSS Slot
  23. grabAnvil_ML = grabAnvil_ML.replaceFirst(grabCSSREF,cssHardcode);
  24. //
  25. //info "Multi Line With CSS Splice: " + grabAnvil_ML;
  26. //
  27. grabHTMLREF = grabAnvil.HTML_Insert_Unique_Ref;
  28. htmlHardCode = "<h1 class='header-one'>What is Lorem Ipsum? RB1</h1><p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the <strong>1500s</strong>, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p><h3 class='header-two'>Where does it come from?</h3><p><table><tr><th>Company</th><th>Contact</th><th>Country</th></tr><tr><td>AlfredsFutterkiste</td><td>MariaAnders</td><td>Germany</td></tr><tr><td>CentrocomercialMoctezuma</td><td>FranciscoChang</td><td>Mexico</td></tr></table></p>";
  29. //
  30. grabAnvil_ML = grabAnvil_ML.replaceFirst(grabHTMLREF,htmlHardCode);
  31. //
  32. //-------------Send Code Off to Anvil PDF---------------------//
  33. //API URL
  34. inputURL = "https://app.useanvil.com/api/v1/generate-pdf";
  35. //Assemble the bodyMap
  36. bodyMap = Map();
  37. bodyMap.put("payload",grabAnvil_ML);
  38. //Assemble the headerMap
  39. headerMap = Map();
  40. //Encode the Key and add to header
  41. apiKey = "HIDDENKEY:";
  42. encodedToken = zoho.encryption.base64Encode(apiKey);
  43. headerMap.put("Authorization","Basic " + encodedToken);
  44. //HELP!! The next bit is where I need to add the grabAnvil_ML (Which contains the JSON object) and add it in so it goes off the the API as multipart/Form data
  45. paramatersMap = Map();
  46. //I am fairly sure the next line is where I am getting it wrong!
  47. paramatersMap = {"paramName":"payload","content":"multipart/form-data","stringPart":"true"};
  48. //
  49. pdfResponse = invokeurl
  50. [
  51. url :inputURL
  52. type :POST
  53. parameters:bodyMap
  54. headers:headerMap
  55. files:paramatersMap
  56. ];
  57. //
  58. info pdfResponse;
  59. }

Any help would be VERY welcome! Thanks




        • Recent Topics

        • How to hide Activity Side Panel

          How do you hide the activity side panel? Clicking on the link and reviewing the activity does not remove it and it does not seem to timeout. I have any activity that have been listed there since January. Thank you.
        • Need a Universal Search Option in Zohobooks

          Hello Zoho, Need a Universal Search Option in Zohobooks to search across all transactions in our books of accounts. Please do the needful Thanks
        • This version of app doesn't support this notecard type Error

          So this problem is happening for any notes created within the last week, as well as any note recently edited on Android. I can open them on my phone fine, but they don't open on the website version. They DO work on the desktop app version. It's just web
        • Ordering of Teams

          Hi there, Currently, we cannot order Teams in Zoho Desk. Teams are ordered as they were created. It would be really helpful if we could customise the order of Teams. For example: We have the following Teams: Shipping Customer Service Sales Compliance
        • How to change the format for phone numbers?

          Mobile phone numbers are currently formatted (###) ###-####.  How can I change this to a more appropriate forms for Australia being either #### ### ### or (#)### ### ###?
        • Zoho Mail Android app update: UI revamp

          Hello everyone! We are excited to share that the first phase of the Zoho Mail Android UI revamp is now live. In this update, we have redesigned navigation bar at the bottom to quickly access the Email, Calendar, Contacts, and Settings modules. Also, the
        • Add Support for Authenticator App MFA in Zoho Desk Help Center

          Hello Zoho Desk Team, We hope you are doing well. We would like to request an enhancement related to security for the Zoho Desk Help Center (customer portal). Currently, the Help Center supports MFA for portal users via SAML, JWT, SMS authentication,
        • All new Address Field in Zoho CRM: maintain structured and accurate address inputs

          Availability Update: 29 September 2025: It's currently available for all new sign-ups and for existing Zoho CRM orgs which are in the Professional edition exclusively for IN DC users. 2 March 2026: Available to users in all DCs except US and EU DC. 24
        • PDF's Give Unsupported Type Error Message

          Many of the pdf files I add to Notebook work fine but in some cases when I try to open them on the Android App I get a message saying "Unsupported Type. Psst! You are using an older version of the app which does not support this note format. Please update
        • Resubscribe with Zoho Campaigns

          Hi, I am new to Zoho Campaigns and sent a campaign to a contact list with only my email address. I wanted to see what the footer links did, so clicked unsubscribe and now can't include my email address into any more campaigns. I don't have a sign up form on my website to resubscribe and can't find how to resubscribe anywhere else. Can you help?
        • Add a way to connect Log360 Cloud logs with Zoho analytics

          Hi, Several month ago Log360 Cloud was added to zoho one - and this is great. But as far as I see there is no prebuilt way to connect Zoho analytics to the logs we have in Log360 Cloud. Please add a prebuilt connection like we have for so many other zoho
        • Dynamic Multi-Staff Selection for Ad-Hoc Bookings

          Summary Allow customers or internal schedulers to select specific staff members at the time of booking, with Zoho Bookings automatically surfacing only the time slots where all selected members are simultaneously available. Current Behaviour Zoho Bookings
        • Recurring event sync via Microsoft 365 Meetings

          I believe syncing Recurring through the Microsoft 365 Meetings integration is already in the works but I couldn't find a reference in the community to track the progress of this work.
        • Share Edit while in Workflow

          There are times that while a writer document is in the middle of a workflow the user that's responsible for that stage of the workflow needs to bring in other people to work on the document. Currently there is no way for the user to be able to allow other's
        • How can I use the API to add a drop-shipping address to a sales order for one-time use?

          I need to be able to add a drop-shipping address for one-time use to a sales order via the API. Adding every such address to the contact (customer), then feeding the shippingaddress_id into the sales order, is not an acceptable approach; we have some
        • Need to set workflow or journey wait time (time delay) in minutes, not hours

          Minimum wait time for both Campaigns workflows and Marketing Automation journeys is one hour. I need one or the other to be set to several minutes (fraction of the hour). I tried to solve this by entering a fraction but the wait time data type is an integer
        • Auto sync Photo storage

          Hello I am new to Zoho Workdrive and was wondering if the is a way of automatically syncing photos on my Android phone to my workdrive as want to move away from Google? Thanks
        • sending email with another account

          Hello there, i write there for an our costumer request. They want to send email from CRM with a different email (confirmed and added to zoho profile). For example they use account@zilium.com but with this account they want to send (not only with email
        • Major journey crash and not loading. Zoho Marketing Automation

          Hi all. Last night (19MAR, 2026) Marketing Automation for a specific journey completely crashed, and since the crash the specific journey has failed to load at all (blank journey canvas, no journey appears, no menu accessible) but other separate journey's
        • Izettle or Sumup Integration for Zoho Books.

          The Stripe & Square clearing works great in Zoho Books. Any further integrations planned in the future for Izettle or Sumup? These card processors are very common for taking payments with a card reader.
        • Is anyone experience missing functions in the new UI until hard refresh?

          The set of functions including search is almost always missing upon loading an app in the new UI. If you refresh, the functions return. (see second screenshot) Anyone else experiencing this?
        • Adding Images to a Quote in Zoho CRM

          We are currently preparing to use Quotes in Zoho CRM and we are building out our Quote templates.  We came across an issue of not being to add Images of the products to the Quote - specifically in the body of the Quote templates.   This is a problem,
        • Mail Search should allow grouping by conversation like Gmail.

          Having switched from gmail I have found the search function hard to use. Mostly because mail is not grouped by conversation in search. If I search for a word when looking for a conversation had with someone then sometimes 10 emails will come up from the
        • Server-based Appication API access for Social, Sites, Flow, Pages.

          Hello, I am trying to hook up API access for a number of apps and I have hit a wall trying to add these scopes to the API feed. We cannot find the correct way to list the scope for these Zoho apps; Social, Sites, Flow, Writer. Error on web-page comes
        • Zoho Landing Page "Something went wrong" Error

          Hello, Every time I try to create a new landing page, I receive a "Something went wrong" error with no explanation. I cannot create any new pages, which means we cannot use this application. I did create one landing page successfully over a month ago,
        • Sync desktop folders instantly with WorkDrive TrueSync (Beta)

          Keeping your important files backed up and accessible has never been easier! With WorkDrive desktop app (TrueSync), you can now automatically sync specific desktop folders to WorkDrive Web, ensuring seamless, real-time updates across devices. Important:
        • Cliq iOS can't see shared screen

          Hello, I had this morning a video call with a colleague. She is using Cliq Desktop MacOS and wanted to share her screen with me. I'm on iPad. I noticed, while she shared her screen, I could only see her video, but not the shared screen... Does Cliq iOS is able to display shared screen, or is it somewhere else to be found ? Regards
        • Zoho → ShipStation Integration – Sales Order–Driven Fulfilment Workflow

          Hello All, I’m reaching out to explore the best way to integrate a shipping tool into our inventory which will speed our process up. We are looking to integrate ShipStation into our existing order-to-fulfilment workflow, as we’re keen to standardise on
        • Newby Questions - Vendors, Customers, and Income vs. Other Income Clarifications

          Q1. For Deposits, there does not seem to be an option for "Income". "Other Income" is an option however. What is the process to add the option to assign a deposit to type "Income"? Q2. In many cases Vendors and Customer are the same. Vendors may purchase
        • Zoho Booking - TIN vs ATIN & ITIN

          Zoho Booking Vendors allows for TAX ID values of SSN, EIN, ATIN an ITIN. There is no option for TIN. What is the method to properly add TIN to the list of taxable values for companies? For reference: Social Security Numbers (SSN) Individual Taxpayer Identification
        • Bank Feed shows redacted description numbers (xxxx)

          Hi All, Is there any way to change this behaviour? Either Zoho or Yodlee is redacting important numbers from the transaction description, preventing us from being able to easily recognise and reconcile transactions. For example, a transaction with a description
        • Can I write a check in Zoho Books with no associated bill?

          This currently does not seem possible, and I have a client that desperately needs this function if I am able to convert them with Quickbooks. Thank you in advance for your reply. 
        • Handling large product migrations in Zoho?

          Hi everyone, How do you usually manage large product catalog migrations (10K+ SKUs) into Zoho One? Main concerns I’m thinking about: Avoiding downtime Preventing data loss Keeping supplier and product relationships intact Do you prefer bulk imports or
        • set up an opportunity progress bar in canva

          Hi, set up an opportunity progress bar in canva I need help to set to reproduce the progress bar or equivalent of the opportunity steps in canva as in standard view (see capture ) Thank you in advance Amadou
        • Reassign Partially Saved Entries

          Hi, I would like to be able to go to Partially Saved Entries and like the option to delete them I would like the option to multi-select and be able to reassign them to another user to complete (Such as when a user has left the company). Thanks Dan
        • Preventing auto-redirect to Parent Record on Save...

          Our users often create records from the related list on th left side of the screen. They click the blue "plus" button to create the record. This is handy, but for some modules, or situations, they would like to remain on the record AFTER clicking "Save",
        • Introducing Version-3 APIs - Explore New APIs & Enhancements

          New Update - The end of life timeline for V2 APIs has now been extended to 30th June, 2026 Happy to announce the release of Version 3 (V3) APIs with an easy to use interface, new APIs, and more examples to help you understand and access the APIs better.
        • Correlated subqueries not supported in Zoho Analytics. This creates huge limitations

          Running into a major limitation in Zoho Analytics: correlated subqueries simply don’t work, even in completely standard SQL patterns inside a JOIN. Example: LEFT JOIN "Bills" b ON d."Id" = b."Deal ID" AND EXISTS ( SELECT 1 FROM "Bill
        • Unknown table or alias 'A1'

          I would like to create a subquery but i am getting the following error: Unknown table or alias 'A1' used in select query. This is the sql statement:  SELECT A1.active_paying_customers, A1.active_trial_customers, A1.new_paying_signup, date(A1.date_active_customers), 
        • Feature announcement - Introducing recipient authentication via Didit in Zoho Sign

          Hi everyone! Zoho Sign already integrates with trusted providers like IDology (US), eID Easy (EU), and Stripe Identity. Today, we're excited to add another powerful option: Didit. Some benefits of using Didit: Unified ID verification Streamlined eKYC
        • Next Page