Automating Vendor Contract Management between Zoho Contracts and Zoho Books using Zoho Flow

Automating Vendor Contract Management between Zoho Contracts and Zoho Books using Zoho Flow

Managing vendor agreements across procurement and finance systems often requires manually downloading executed contracts and attaching them to vendor records. This can become time-consuming and difficult to manage when dealing with a large number of contracts.

In this post, we’ll share a simple automation built using Zoho Flow, Zoho Contracts APIs, and Zoho Books that connects procurement, legal, and finance workflows.

This integration automatically:
  1. Creates counterparties and contracts in Zoho Contracts when a vendor is added in Zoho Books
  2. Detects when a contract is executed in Zoho Contracts
  3. Downloads the executed contract
  4. Attaches the signed contract to the vendor record in Zoho Books
This enables a seamless Procure-to-Pay vendor contract workflow and demonstrates how Zoho Contracts can be integrated with finance systems to streamline vendor agreement management.

Business Use Case – Procure to Pay

A typical vendor agreement lifecycle involves:
  1. Vendor onboarding in Zoho Books
  2. Contract creation, negotiation, and execution in Zoho Contracts
  3. Executed agreement available for the finance team’s reference
Without automation, finance teams must manually download the executed agreement and attach it to the vendor record.

Prerequisites

Before implementing this automation, ensure the following setup is completed:
  1. Zoho Books and Zoho Contracts are configured in your organization
  2. Zoho Flow is enabled and connected to both Zoho Books and Zoho Contracts
  3. API connections are configured for Zoho Books and Zoho Contracts in Zoho Flow
  4. Appropriate permissions are available to create counterparties and contracts in Zoho Contracts
  5. Additionally, create a custom field in Zoho Books (Vendor module) to store the Zoho Contracts Counterparty API Name.
Example:
  1. Field Name: Contracts Counterparty ID
  2. Field Type: Text
  3. Module: Vendors
This field helps map vendors in Zoho Books with their corresponding counterparties in Zoho Contracts.

Solution Overview

Zoho applications involved:
  1. Zoho Contracts
  2. Zoho Books
  3. Zoho Flow
The automation is implemented using two flows.

Flow 1 – Vendor Creation → Contract Creation

Trigger: A new vendor is created in Zoho Books.



Actions:
  1. Zoho Flow detects the new vendor.



  1. A custom function checks whether a corresponding counterparty exists in Zoho Contracts
  2. If the counterparty does not exist, a new counterparty is created in Zoho Contracts



  1. The counterparty API name is stored in Zoho Books
  2. A contract is automatically created in Zoho Contracts for that vendor



Custom Function Snippet (Create Counterparty and Contract):

Notes
Note: The custom functions shared below are working reference implementations. However, depending on your environment, you may need to update certain values before using them in your setup.

Please review and update the following as applicable:
  1. Connection names used in the invokeurl statements
  2. Organization ID used for Zoho Books API calls
  3. Custom field API names used to store the Counterparty reference in Zoho Books
  4. Contract type API names configured in Zoho Contracts
Ensure these values are updated according to your configuration before deploying the automation
.
  1. map createContract1(string vendorName, string vendorID, string counterpartyID)
  2. {
  3. result = Map();
  4. createdCounterPartyAPIName = "";
  5. if(counterpartyID != null && counterpartyID != "")
  6. {
  7.  existingCounterpartyResponse = invokeurl
  8.  [
  9.   url :"https://contracts.zoho.in/api/v1/counterparties/" + counterpartyID
  10.   type :GET
  11.   connection:"zcontractsconn"
  12.  ];
  13.  if(existingCounterpartyResponse.get("counterparty") != null)
  14.  {
  15.   createdCounterPartyAPIName = existingCounterpartyResponse.get("counterparty").get("apiName");
  16.  }
  17. }
  18. if(createdCounterPartyAPIName == "")
  19. {
  20.  counterpartyMap = Map();
  21.  counterpartyMap.put("name",vendorName);
  22.  counterpartyMap.put("counterPartyType","vendor");
  23.  createResponse = invokeurl
  24.  [
  25.   url :"https://contracts.zoho.in/api/v1/counterparties"
  26.   type :POST
  27.   parameters:counterpartyMap.toString()
  28.   connection:"zcontractsconn"
  29.  ];
  30.  counterpartyDetail = createResponse.getJSON("counterparties").get(0);
  31.  createdCounterPartyAPIName = counterpartyDetail.get("organizationApiName");
  32.  customFields = List();
  33.  cf = Map();
  34.  cf.put("api_name","cf_contracts_counterparty_id");
  35.  cf.put("value",createdCounterPartyAPIName);
  36.  customFields.add(cf);
  37.  updateMap = Map();
  38.  updateMap.put("custom_fields",customFields);
  39.  updateVendor = invokeurl
  40.  [
  41.   url :"https://books.zoho.in/api/v3/vendors/" + vendorID + "?organization_id=60047651581"
  42.   type :PUT
  43.   parameters:updateMap
  44.   connection:"zbooks"
  45.  ];
  46. }
  47. info "STEP 4 STARTED - Preparing Contract Variables";
  48. newContractType = "master-subscription-agreement-pro-plus";
  49. newContractName = "Agreement with " + vendorName;
  50. isNewContractTermIsDefinite = false;
  51. isNewContractRenewable = false;
  52. contractEffectiveDate = 1;
  53. info "Contract Type: " + newContractType;
  54. info "Contract Name: " + newContractName;
  55. info "Counterparty API Name: " + createdCounterPartyAPIName;
  56. newContractDetail = {"externalSource":true,"inputfields":{{"metaApiName":"contract-type","inputs":{{"inputApiName":"contract-type","inputValue":newContractType}}},{"metaApiName":"contract-term","inputs":{{"inputApiName":"contract-term","inputValue":isNewContractTermIsDefinite}}},{"metaApiName":"is-renewable","inputs":{{"inputApiName":"is-renewable","inputValue":isNewContractRenewable}}},{"metaApiName":"title","inputs":{{"inputApiName":"title","inputValue":newContractName}}},{"metaApiName":"party-b-name","inputs":{{"inputApiName":"party-b-name","inputValue":createdCounterPartyAPIName}}},{"metaApiName":"contract-effective-date","inputs":{{"inputApiName":"contract-effective-date","inputValue":contractEffectiveDate}}}}};
  57. createContractResponse = invokeurl
  58. [
  59.  url :"https://contracts.zoho.in/api/v1/createcontract"
  60.  type :POST
  61.  body:newContractDetail.toString()
  62.  headers:{"Content-Type":"application/json"}
  63.  connection:"zcontractsconn"
  64. ];
  65. info createContractResponse;
  66. result.put("counterpartyApiName",createdCounterPartyAPIName);
  67. result.put("contractResponse",createContractResponse);
  68. return result;
  69. }

Flow 2 – Contract Execution → Attach Signed Agreement

Trigger: Contract signing is completed in Zoho Contracts

Actions: 
  1. Zoho Flow detects the contract execution event



  1. A custom function calls the Zoho Contracts API to download the executed contract document.
  2. The function identifies the corresponding vendor in Zoho Books.
  3. The executed agreement is automatically attached to the vendor record in Zoho Books.



Custom Function Snippet (Retrieve and Attach Signed Contract):
  1. map attachSignedContractToVendor(string contractApiName, string contractTitle)
  2. {
  3. result = Map();
  4. orgID = "60047651581";

  5. info "FLOW 2 STARTED";
  6. info contractApiName;
  7. info contractTitle;

  8. if(contractApiName.startsWith("contract/"))
  9. {
  10.     contractApiName = contractApiName.replaceAll("contract/","");
  11. }

  12. info "Clean Contract API Name: " + contractApiName;

  13. if(contractTitle.startsWith("Agreement with "))
  14. {
  15.     vendorName = contractTitle.subString(15);
  16. }
  17. else
  18. {
  19.     vendorName = contractTitle;
  20. }

  21. info "Vendor Extracted: " + vendorName;

  22. vendorSearch = invokeurl
  23. [
  24.     url :"https://books.zoho.in/api/v3/contacts?contact_name=" + vendorName + "&organization_id=" + orgID
  25.     type :GET
  26.     connection:"zbooks"
  27. ];

  28. info vendorSearch;

  29. contactsList = vendorSearch.get("contacts");

  30. if(contactsList == null || contactsList.size() == 0)
  31. {
  32.     info "Vendor not found";
  33.     result.put("status","vendor_not_found");
  34.     return result;
  35. }

  36. vendorID = contactsList.get(0).get("contact_id");

  37. info "Vendor ID: " + vendorID;

  38. info "Downloading signed contract";

  39. signedFile = invokeurl
  40. [
  41.     url :"https://contracts.zoho.in/api/v1/download/contracts/" + contractApiName + "/signed/document"
  42.     type :GET
  43.     connection:"zcontractsconn"
  44. ];

  45. info signedFile;

  46. fileMap = Map();
  47. fileMap.put("attachment",signedFile);
  48. fileMap.put("organization_id",orgID);

  49. info "Uploading attachment to Zoho Books";

  50. uploadResponse = invokeurl
  51. [
  52.     url :"https://books.zoho.in/api/v3/contacts/" + vendorID + "/attachment?organization_id=" + orgID
  53.     type :POST
  54.     parameters:fileMap
  55.     connection:"zbooks"
  56.     content-type:"multipart/form-data"
  57. ];

  58. info uploadResponse;

  59. result.put("uploadResponse",uploadResponse);

  60. info "FLOW 2 COMPLETED";

  61. return result;
  62. }
Benefits
  1. This automation provides several advantages:
  2. Eliminates manual document handling
  3. Ensures finance teams always have access to executed agreements
  4. Connects legal and finance workflows
  5. Improves compliance and audit readiness
  6. Reduces operational friction
Closing

If you're implementing Procure-to-Pay contract workflows, this approach can help streamline the connection between Zoho Contracts and finance systems like Zoho Books.

We’d be happy to discuss variations of this implementation or answer any questions.

If you're planning to implement a similar workflow and need guidance, feel free to reach out to the Zoho Contracts support team at support@zohocontracts.com.
.
Stay tuned for more tips, tricks, and automation ideas around Zoho Contracts.



Cheers,
Sathyakeerthi
Zoho Contracts Team

    • Sticky Posts

    • Adding signature fields in your contract template

      When you send a contract document for the signing process, you have to insert the signature fields into your contract document by dragging and dropping them for each signer. It won't be effort-intensive for contracts that have fewer pages or signers.
    • Mapping Billing Country Field to Your Contract Template Field

      In Zoho CRM, while configuring Counterparty Fields Mapping to map counterparty information in your contract type, the field 'Billing Country' doesn't have the support to be mapped due to field type mismatch. Because the Billing Country field in Zoho CRM
    • Bulk Import Counterparty Data

      Currently, as the feature to bulk import counterparty data is not available, here is a solution using our APIs that would be useful for our customers. For example, Zoho CRM customers can import their Accounts as counterparties in Zoho Contracts. Using
      • Recent Topics

      • Incorrect Functioning of Time Logs API (Version 3)

        We need to fetch the list of time logs for each task for our company internal usage. We are trying to achieve it by using the next endpoint: https://projects.zoho.com/api-docs#bulk-time-logs#get-all-project-time-logs Firstly, in the documentation the
      • IMPORTANT: It doesn´t search for letters with portuguese characters.

        Some of my articles have for example the word "vídeo". But if I search for "vídeo" it doesn´t find them. If I search for "video" it does find them. Idealy, it should find the articles either way. But if I have to choose, it would be better to find the
      • IMPORTANT: It doens´t show full article name on search - Should add line break

        When we search for articles, it doesn´t show the full name. There should be a line break so the user can see the full article name, otherwise the user can´t know if that´s the article he/she is looking for. This is very important, otherwise the user has
      • Zoho Books - Payment Gateway - Revolut

        Hi Books Team, My feature request if to include the popular platform Revolut as a payment collection option on invoices in Zoho Books. Please upvote if you are also looking for this option.
      • Zoho Books | Product updates | January 2026

        Hello users, We’ve rolled out new features and enhancements in Zoho Books. From e-filing Form 1099 directly with the IRS to corporation tax support, explore the updates designed to enhance your bookkeeping experience. E-File Form 1099 Directly With the
      • Kaizen #233 - Generating AI-powered Follow-up Emails Using CRM Functions and Widgets

        Hey everyone! Welcome back to another interesting post in the Kaizen series! Sales teams regularly capture interaction notes in CRM after speaking with prospects. However, drafting a follow-up email that reflects the conversation context can be repetitive
      • Connect Bank in Zoho Books

        Can I connect UOB or Ariwallex in Zoho Books?
      • Using MPN across multiple SKUs and inventory tracking

        I have several different SKU's that share a common MPN and would like to track inventory by MPN. SKU1 has MPN1 assigned SKU2 has MPN1 assigned Here is an example If I start with 5 of MPN 1 in stock I want each SKU1 and SKU2 to show as 5 in stock, If I
      • Extend Zoho Canvas Customization to Zoho Creator Forms and Reports

        Currently, Zoho Canvas allows users to design and customize the UI of Zoho CRM modules with a much better visual experience. This helps organizations create cleaner layouts, improve usability, and design interfaces that match their workflows. However,
      • Marketing Tip #1: Optimize item titles for SEO

        Your item title is the first thing both Google and shoppers notice. Instead of a generic “Leather Bag,” go for something detailed like “Handcrafted Leather Laptop Bag – Durable & Stylish.” This helps your items rank better in search results and instantly
      • Feature Enhancement Request – Text Formatting Options in Item Description (Zoho Books/Quotes Module)

        Dear Zoho Development Team, Greetings from Radiant360 Integrated Technical Services LLC. We would like to bring to your attention a functional limitation we've encountered within the Item Table / Quote Description section of Zoho Books (and Zoho CRM Quotes).
      • ZOHO Books Query

        Good day, Can someone please advise. I recently migrated from ZOHO Invoice to ZOHO Books. No that I want to use the inventory on Books I cant as all my items have transaction history. The person I spoke to at ZOHO said I need to create a new Company profile
      • Best way to schedule bill payments to vendors

        I've integrated Forte so that I can convert POs to bills and make payments to my vendors all through Books. Is there a way to schedule the bill payments as some of my vendors are net 30, net 60 and even net 90 days. If I can't get this to work, I'll have
      • ZOHO.CRM.UI.Record.open not working properly

        I have a Zoho CRM Widget and in it I have a block where it will open the blocks Meeting like below block.addEventListener("click", () => { ZOHO.CRM.UI.Record.open({ Entity: "Events", RecordID: meeting.id }).catch(err => { console.error("Open record failed:",
      • inventory removal at packing list or shipment.

        currently our system is set to remove inventory at invoice. This is creating an inventory nightmare? Is it possible to change the settings to remove the item from inventory at either the packing slip stage or shipping the item.
      • How to add employee and not invite them to log in?

        I want to add 50 employees, but invite them only when everything will be configured and ready. Is it possible? Should we create employee profiles and then convert them later? Thank you,
      • How is Your eCommerce Experience w/Zoho Inventory?

        First off, I'm SUPER grateful for the advent of Zoho Inventory and now the Zoho Commerce Suite. Overall, Inventory is a great product, especially for customers without an eCommerce presence. For eCommerce companies (especially those shipping more than ~10 packages/day), however, there are certain drawbacks that keep my clients from moving over to Zoho Inventory: Cons: 1. Invoice + Package Creation from Shopify/Other eCommerce Integrations: Zoho Inventory makes the somewhat perplexing decision to
      • Ability to Use Both AND and OR When Creating Rules (Advanced Conditions)

        I'd like to be able to use more complicated logic when setting up rules. E.g. in Zoho Mail, I can choose "Advanced conditions (AND/OR) to create a rule that can be applied to multiple subject lines from the same sender. But in Zoho TeamInbox, I will have
      • Zoho Desktop App- Unable to Minimize/Freezes

        I'm having issues with my Zoho Mail desktop app (PC). When go on my desktop and open the app this is what happens: - Unable to minimize and close app (in the screenshot attached you can see at the top right there is no option to minimize/close) - Unable
      • Zoho Invoice Zapier Integration

        Is there still a way to use Zapier with Zoho Invoice? I've read online that that migrated to Zoho Books or Billing but since I am just using Invoice I can not find a Zapier Connection anymore.
      • Conect chat of salesiq with zoho cliq

        Is there any way to answer from zoho cliq the chat of salesiq initiated by customers?
      • Bug: OAuth 2.0 State Parameter fails with Pipe Delimiters (RFC 6749 Non-Compliance)

        I've discovered a bug in how Zoho's API Console handles the OAuth 2.0 authorization flow when the state parameter contains pipe characters (|), and I'm hoping the Zoho team can address this in a future update. The Issue Zoho's OAuth 2.0 implementation
      • Zobot with Plugs

        Hello, I am having a problem with Zobot using Plugs. Here is my current flow: When I run the flow, I should immediately see the messages from the initial cards (Send Message cards), then after running the plug, and finally, see the messages after the
      • Print a document from Zoho Writer via Zoho Creator

        If i use the code below i can get writer to create a new document or email it to me but i want to be able to print it directly from the browser and not have to send it via email and then print. Below is the code im using. Attached options form zoho writer
      • Is it possible to use HTML formatting in SMS messages sent from Zoho?

        Hi everyone, I have a question regarding sending SMS from Zoho When we send emails from Zoho, we can include HTML code to format the message (like adding links, styling, etc.). Is it possible to do something similar when sending SMS messages through Zoho
      • Training for How can i Operate the Software Features

        need to Help for Training of the ZOHO Billing Software
      • Automating Vendor Contract Management between Zoho Contracts and Zoho Books using Zoho Flow

        Managing vendor agreements across procurement and finance systems often requires manually downloading executed contracts and attaching them to vendor records. This can become time-consuming and difficult to manage when dealing with a large number of contracts.
      • Problem applying batch operation error keeps looping that error

        Problem applying batch operation error keeps looping that error an wont login
      • Shared Email Sending Duplicate Copies of Emails

        Hi there, We recently have moved our info@ email to Team Inbox to trial. We set this channel up using the Microsoft setup which works fine and have 3 users. I am wanting to know: 1. When I send a new email, it will create a copy of that email and send
      • merhaba

        merhaba sosyal medya paketimiz mevcut ama yorumları göremiyoruz ve o yüzden cevap veremiyoruz destek rica ediyoruz.
      • Teaminbox not working

        We couldn't send or receive any mail within the team inbox. Displaying error 'Unable to process this request.'
      • Related lists New option in missing

        hi I have created quite a few modules and added as related lists to my main module. Some have new, some dont I can not see why?
      • Cliq and ToDo integrations?

        I'm a bit surprised not to find any way to open a Cliq chat for the current thread, or to create a Zoho Mail ToDo from a thread. Are these on the roadmap?
      • Reply-to names are mangled

        Hello, I'm seeing an odd behavior in replies. Steps to reproduce: 1. Click reply to an email from "John Doe <doe.john@example.com> in TeamInbox Expected outcome: TO field pre-filled with "John Doe <doe.john@example.com>" Actual outcome: TO field pre-filled
      • I CANT UPGRADE MY FREE ACCOUNT

        I TRY TO UPGRADE MY FREE ACCOUNT AND I COULD NOT UPGRADE IT CAN SOMEBODY TELL ME WHY? AND I HAVE THE MONEY SO.
      • Level up your ASO game with tags & categories in store reviews

        Introducing tags and categories in Apptics' store reviews Dear Apptics community, If your app is listed on the Play Store or App Store, you already know how important store reviews and ratings are. They’re one of the most direct signals of user sentiment
      • Including attachments with estimates

        How can attachments be included when an estimate is sent/emailed and when downloaded as a .pdf? Generally speaking, attachments should be included as part of an estimate package. Ultimately, this is also true for work orders and invoices.
      • Adding VENDOR SKU to PURCHASE ORDERS

        how can we add the Vendor SKU when issuing a Purchase Order , so the PO shows the Supplier SKU and our own Internal SKU , which is what we want to receive into the system .
      • Possible to freely prompt/query CRM data using Zia?

        Is it possible to prompt Zia to query on any information stored in the CRM, especially on the data stored in custom text fields? My use case is the people in my organisation have entered lots of text in custom text fields to capture information from an
      • Restrict employees to take only one day holiday from a multi-day festival holiday

        Hi everyone, I have a requirement related to Optional/Festival Holidays in Zoho People. For example, in the month of May there are three optional holiday dates: May 11, May 12, and May 13. Employees can choose one of these days as their optional holiday.
      • Next Page