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

    • Google Fonts Integration in Pagesense Popup Editor

      Hello Zoho Pagesense Team, We hope you're doing well. We’d like to submit a feature request to enhance Zoho Pagesense’s popup editor with Google Fonts support. Current Limitation: Currently, Pagesense offers a limited set of default fonts. Google Fonts
    • Clone Entire Zoho Boooks Organization, including all transactions for testing & training

      Can Zoho Books support help with direct cloning of entire Zoho Books & Inventory Organization? including all transactions, just like a copy & paste or disk cloning. Is this possible?
    • Restrict portal signup until registration form and payment are completed

      Hi everyone, I am working on a Zoho Creator portal for a project. In our business flow, users must first fill out a registration form and pay a registration fee before they are allowed to access the portal. However, when I share the portal link, users
    • Zoho Creator In-App Notification

      Hi Team, I have implemented an in-app notification using code, as it required some customization. I followed the example in the link below: https://www.zoho.com/deluge/help/pushnotify-using-deluge.html#Example I have a couple of questions regarding this
    • Tip #64- Exploring Technician Console: Screenshot- 'Insider Insights'

      Hello Zoho Assist Community! Have you ever needed to capture exactly what's happening on a remote machine, whether to document an issue, guide a customer, or keep a record of your session? That's where the Screenshot feature in Zoho Assist comes in! With
    • Relating Invoices to Projects

      Hi Zoho team, If I have already created previously an invoice in Books, so I want to know how can I associate it with a relevant project? Thank you
    • Create a quote/estimate that includes a range of prices

      I am interested in using Zoho Books' Quote templates to create estimates for my customers. I do a mix of fixed-bid quotes and quotes based on an hourly rate. For the hourly rate quotes/estimates, I like to include a price range, for example: 2-4 labor
    • Budget

      I have just upgraded to the standard plan in order to be able to utilize the budgeting function and record budget amount
    • Capirec bank Automatic feed update

      Can anyone tell me if Zoho supports Automatic bank feed update from a Capitec bank account in south africa?
    • Free webinar! Accelerate deals with Zoho Sign for Zoho CRM and Bigin by Zoho CRM

      Hello, Paperwork shouldn’t slow you down. Whether you’re growing a small business or running a large enterprise, manual approvals and slow document turnaround can cost you time and revenue. With Zoho Sign for Zoho CRM and Bigin by Zoho CRM, you can take
    • Add Lookup Field in Tasks Module

      Hello, I have a need to add a Lookup field in addition to the ones that are already there in the Tasks module. I've seen this thread and so understand that the reason lookup fields may not be part of it is that there are already links to the tables (
    • CRM x WorkDrive: File storage for new CRM signups is now powered by WorkDrive

      Availability Editions: All DCs: All Release plan: Released for new signups in all DCs. It will be enabled for existing users in a phased manner in the upcoming months. Help documentation: Documents in Zoho CRM Manage folders in Documents tab Manage files
    • Upload own Background Image and set Camera to 16:9

      Hi, in all known online meeting tools, I can set up a background image reflecting our corporate design. This doesn't work in Cliq. Additionally, Cliq detects our cameras as 4:3, showing black bars on the right and left sides during the meeting. Where
    • 【まだ間に合う!】Zoho ユーザー交流会 | AI活用・CRM・Analytics の事例を聞いて、ユーザー同士で交流しよう!

      ユーザーの皆さま、こんにちは。コミュニティチームの藤澤です。 3月27日(金)に東京、新橋で開催する「東京 Zoho ユーザー交流会 NEXUS」へのお申し込みがまだの方は、この機会にぜひお申し込みください!(参加無料) ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー イベントの詳細はこちらから▷▷ https://www.zohomeetups.com/tokyo2026vol1#/?affl=communityforumpost3 ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
    • ZeptoMail API

      Hello Since today, we experience issues with the ZeptoMail API. When trying to send e-mails using: https://api.zeptomail.eu/v1.1/email we receive the error: (503) Site unavailable due to a traffic surge. Please try again shortly. I kindly ask you to identify
    • Sender Email Configuration Error.

      Hello Team, Hope you are all doing well. We are in the process of creating the Zoho FSM environment in the UAE. When we try to add the sender email address “techsupportuae@stryker.com”, we receive the error message: “Error occurred while sending mail
    • Managing user mailbox actions

      An organization often has users with different roles and responsibilities, such as leadership, operations, or support teams. While some users may require full access to email features, others may only need limited functionality. For example, enabling
    • Custom function return type

      Hi, How do I create a custom deluge function in Zoho CRM that returns a string? e.g. Setup->Workflow->Custom Functions->Configure->Write own During create or edit of the function I don't see a way to change the default 'void' to anything else. Adding
    • Update P_Leave: code: 7052 "Employee_ID": "Enter Employee ID"

      Hi, Zoho People - Update Leaves Can someone assist? ------------------------------------------------------------------------------------------ col = Collection(); col.insert("recordid":id); col.insert("Date_Check_Approval":zoho.currentdate); info zoho.people.update("P_Leave",col.toMap());
    • Prevent tracking users from specific countries

      Currently, I’m receiving many bot visits from the United States and Malaysia. I would like these visits not to be recorded in SalesIQ. I already enabled the option to exclude traffic from cloud service providers, but I’m still receiving bot visits. Ideally,
    • Es posible cambiar el lenguaje de los modulos del ASAP?

      Es posible cambiar el lenguaje de estos textos? Tengo Zoho configurado en español pero aun así me muestra estos textos en ingles:
    • Using workflows to automatically set classification of new tickets

      Hello, I am trying to use a workflow to set a classification for a new ticket that is created via an email coming into my desk department. The workflow is working fine if I create a ticket from within desk, however if a ticket is emailed in then this
    • Text/SMS With Zoho Desk

      Hi Guys- Considering using SMS to get faster responses from customers that we are helping.  Have a bunch of questions; 1) Which provider is better ClickaTell or Screen Magic.  Screen Magic seems easier to setup, but appears to be 2x as expensive for United States.  I cannot find the sender id for Clickatell to even complete the configuration. 2) Can customer's reply to text messages?  If so are responses linked back to the zoho ticket?  If not, how are you handling this, a simple "DO NOT REPLY" as
    • Default/Private Departments in Zoho Desk

      1) How does one configure a department to be private? 2) Also, how does one change the default department? 1) On the list of my company's Zoho Departments, I see that we have a default department, but I am unable to choose which department should be default. 2) From the Zoho documentation I see that in order to create a private department, one should uncheck "Display in customer portal" on the Add Department screen. However, is there a way to change this setting after the department has been created?
    • Show unsubscribed contacts ?

      Hello, I would like to display the unsubscribed contacts. Unfortunately, I do not have this subscription type as described in the documentation (https://help.zoho.com/portal/en/kb/marketing-automation-2-0/user-guide/contacts/contact-management/articles/subscription-type-24-1-2024#Subscription_Type_field.)
    • What's New in Zoho Inventory | Q2 2025

      Hello Customers, The second quarter have been exciting months for Zoho Inventory! We’ve introduced impactful new features and enhancements to help you manage inventory operations with even greater precision and control. While we have many more exciting
    • "Spreadsheet Mode" for Fast Bulk Edits

      One of the challenges with using Zoho Inventory is when bulk edits need to be done via the UI, and each value that needs to be changed is different. A very common use case here is price changes. Often, a price increase will need to be implemented, and
    • Cloning Item With Images Or The Option With Images

      Hello, when I clone an item, I expect the images to carry over to the cloned item, however this is not the case in Inventory. Please make it possible for the images to get cloned or at least can we get a pop up asking if we want to clone the images as
    • ZOHO BOOKS - RECEIVING MORE ITEMS THAN ORDERED

      Hello, When trying to enter a vendor's bill that contains items with bigger quantity than ordered in the PO (it happens quite often) - The system would not let us save the bill and show this error: "Quantity recorded cannot be more than quantity ordered." 
    • Stock count by bin location

      Is there a configuration to make a stock count by bin or area and not by product. these is useful to manage count by area Regards
    • 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 Survey – Page Skip Logic Not Working

      Hi everyone, I'm experiencing an issue with the page skip logic in Zoho Survey. Last week, it was working fine, and I haven’t changed anything in the settings. However, today the skip logic is not working at all. I also tried testing it with different
    • Zoho Survey: Bulk Exporting Raw Data (CSV/Excel) from 100+ Individual Survey Projects

      Hi Zoho Community, I am currently managing a 360-degree evaluation process that involves 100+ individual survey projects (one separate survey for each employee being evaluated). I need to download the raw response data (CSV or Excel) for all 100 surveys.
    • Brand Studio Projects in Analytics

      Hi All, Currently pulling my hair out over trying to link together some social media posts for a reporting dashboard in Analytics, so I thought I'd see if anyone on here had a solution. Our Marketing Team created a LinkedIn campaign in Zoho Brand Studio,
    • ERROR: Product type cannot be changed for Items having transactions.

      I have mistakenly added a product type as goods for an item that was a digital service. Now when HSN/SAC became mandatory, this brought my attention to this error I did. So I tried changing the product type but it displayed this error message Product
    • Combine and hide invoice lines

      In quickbooks we are able to create a invoice line that combines and hides invoices lines below. eg. Brochure design         $1000 (total of lines below, the client can see this line) Graphic Design           $600 (hidden but entered to reporting and
    • Introducing Built-in Telephony in Zoho Recruit

      We’re excited to introduce Built-in Telephony in Zoho Recruit, designed to make recruiter–candidate communication faster, simpler, and fully traceable. These capabilities help you reduce app switching, handle inbound calls efficiently, and keep every
    • Include Notes in email templates for task

      Hi there,  I am setting up some automated email reminders via "setup-automation-workflow" to be send out when a task is being edited. I would like to include the "task notes" in the email. Is that possible? I do not find that field in the dropdown table when setting up the email template. Is it also possible to trigger the workflow rule when a new note is added to the task? In my opinion that should be quite essential, since a task update is often done by adding a new note to the task.... Also i
    • Auto-publish job openings on my Zoho Recruit Careers Website

      I have developed a script using the Zoho Recruit API that successfully inserts new jobOpening records to my Zoho Recruit website, but my goal is to auto-publish to the Careers Website. The jobOpening field data shows two possible candidates to make this
    • [Free webinar] Custom domains for portals in Zoho Creator - Creator Tech Connect

      Hello everyone, We’re excited to invite you to another edition of the Creator Tech Connect webinar. About Creator Tech Connect The Creator Tech Connect series is a free monthly webinar featuring in-depth technical sessions designed for developers, administrators,
    • Next Page