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

    • Detailed list of scoring rules in Zoho CRM

      Good morning Zoho community, warm greetings The reason for my message today is that I have a problem with my CRM, which I will explain below: Our organization has scoring rules designed to rate our potential customers or leads in the application based
    • How to create a summary document from Projects details

      Hi, Our team is creating many projects inside Zoho Project. When closing a project, they write a summary document containing data from the projects it-self (understand project budget, customers, etc...), and editable (ie the document is either a Writer
    • Host in US Data Centre

      I humble apply to be registered on US Data centre
    • convert the project to templet

      i have some deployment ME product for different customer , i need to create a fixed template for use it rather then keeping creating this template every time
    • Best practices for managing Project Charters, Business Case and RAID logs within Zoho?

      Hello everyone, I’m currently refining our PMO setup within Zoho Projects and I’m curious how others are handling high-level governance documentation. We’ve been using the standardized Project Charter, Business Case and RAID frameworks from projectmanagertemplate.com
    • Work Orders / Bundle Requests

      Zoho Inventory needs a work order / bundle request system. This record would be analogous to a purchase order in the purchasing workflow or a sales order in the sales cycle. It would be non-journaling, but it would reserve the appropriate inventory of
    • 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.
    • Trying to access records in a custom module in Zoho Desk and not having luck

      I've built a custom module in Zoho Desk and am using a custom function to query the records in the module and I'm not having any luck. The only way I have found to retreive a record is by getting it by its recordID (the long zoho assigned one). The function
    • ZOHO Books Smart Accounting Software for Travel Agency

      Dear Travel partner, Contact for Travel Agency Accounting Setup & Training Vansh Travel (ZOHO Books Authorised partner) Email: info@vanshtravel.com Mo: +91 98984 95155 Please find PDF   
    • 452 Mailbox delivery restricted by policy error

      We have been testing Zoho desk for about a week now and have been forwarding emails in via an Exchange Online Mail flow rule without issue until yesterday. Suddenly yesterday morning we started getting the vast majority of the emails stuck in Pending
    • Send Email reply on behalf of Agent

      Hi, When using the send email reply via the API I can set the reply on behalf of the customer by using impersonatedUserId in the header of the API call. Is there a way to do this for Agents too? I need to be able to send an email reply on behalf of an
    • Sharing Tickets to a team within a department

      Hi there, We have a need for one department to be able to share tickets to a specific team within a department, I'm wondering if this is possible? All the shared tickets are going into the 'Shared Tickets' view for the whole department but is there a
    • Do not use isnull()

      Does not always return booleans. Can also return null. Never use this function. Just use var==null instead.
    • FSM integration with Books

      Hi, I have spent a few months working with FSM and have come across a critical gap in the functionality, which I find almost shocking....either that, or I am an idiot. The lack of bi-directional sync between Books and FSM on Sales Orders/ Work Orders
    • Unable to load a specific image

      Hi I am trying to upload an svg file, which reports that there is "a problem with the file", but does not say what sort of problem. I can't find anything which says which files are supported, so it may be it does not support svg. (which would be a real shame) The file itself will open in either Firefox or Chrome without problem. For the moment I am using a png file, which does not zoom well of course. David
    • Why does the Address field show the wrong map location even with a correct Pincode?

      I am noticing an issue with the Address field map in Zoho Creator. When I enter a city name that exists in multiple locations within the same state, the map sometimes points to the wrong area even if I have entered the correct Pincode. Currently, it seems
    • Archive Option in Conversation View

      Hello, I have a suggestion\request to add an "Archive Thread" button in conversation view of Zoho Mail. The best suggestion I have is to put an "Archive Thread" button next to the "Label Entire Thread" button in conversation view. Most users don't just
    • Outlook/Hotmail Blocking Zoho SMTP IPs (S3150)

      We are currently facing a serious deliverability issue with Zoho SMTP while sending transactional OTP emails for our production application. Emails sent to Outlook / Hotmail addresses are being rejected with the following error: 550 - 5.7.1 Unfortunately,
    • Outlook is blocking incoming mail

      Outlook is blocking all emails sent from the Zoho server. ERROR CODE :550 - 5.7.1 Unfortunately, messages from [136.143.169.51] weren't sent. Please contact your Internet service provider since part of their network is on our block list (S3150). It looks
    • Zoho Social API for generating draft posts from a third-party app ?

      Hello everyone, I hope you are all well. I have a question regarding Zoho Social. I am developing an application that generates social media posts, and I would like to be able to incorporate a feature that allows saving these posts as drafts in Zoho Social.
    • Temporarily rate limited due to IP reputation.

      We have suddenly started receiving the following Mail Delivery Status Notification: Diagnostic-Code: 4.7.650 The mail server [136.143.184.12] has been temporarily rate limited due to IP reputation. For e-mail delivery information, see https://aka.ms/postmaster
    • 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
    • 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
    • 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,
    • Any Offline Developing Environements or IDE's for Zoho Creator

      Hi there, Is there any offline developing environment for zoho creator like the Eclipse for sales force.com? So that i could make my development faster. Its taking a laot of time to write save and verify the code in Zoho Creator online. Thanks in advance
    • 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?
    • Next Page