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:
- Creates counterparties and contracts in Zoho Contracts when a vendor is added in Zoho Books
- Detects when a contract is executed in Zoho Contracts
- Downloads the executed contract
- 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:
- Vendor onboarding in Zoho Books
- Contract creation, negotiation, and execution in Zoho Contracts
- 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:
- Zoho Books and Zoho Contracts are configured in your organization
- Zoho Flow is enabled and connected to both Zoho Books and Zoho Contracts
- API connections are configured for Zoho Books and Zoho Contracts in Zoho Flow
- Appropriate permissions are available to create counterparties and contracts in Zoho Contracts
- Additionally, create a custom field in Zoho Books (Vendor module) to store the Zoho Contracts Counterparty API Name.
Example:
- Field Name: Contracts Counterparty ID
- Field Type: Text
- Module: Vendors
This field helps map vendors in Zoho Books with their corresponding counterparties in Zoho Contracts.
Solution Overview
Zoho applications involved:
- Zoho Contracts
- Zoho Books
- 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:
- Zoho Flow detects the new vendor.
- A custom function checks whether a corresponding counterparty exists in Zoho Contracts
- If the counterparty does not exist, a new counterparty is created in Zoho Contracts
- The counterparty API name is stored in Zoho Books
- A contract is automatically created in Zoho Contracts for that vendor
Custom Function Snippet (Create Counterparty and Contract):
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:
- Connection names used in the invokeurl statements
- Organization ID used for Zoho Books API calls
- Custom field API names used to store the Counterparty reference in Zoho Books
- Contract type API names configured in Zoho Contracts
Ensure these values are updated according to your configuration before deploying the automation
.
- map createContract1(string vendorName, string vendorID, string counterpartyID)
- {
- result = Map();
- createdCounterPartyAPIName = "";
- if(counterpartyID != null && counterpartyID != "")
- {
- existingCounterpartyResponse = invokeurl
- [
- url :"https://contracts.zoho.in/api/v1/counterparties/" + counterpartyID
- type :GET
- connection:"zcontractsconn"
- ];
- if(existingCounterpartyResponse.get("counterparty") != null)
- {
- createdCounterPartyAPIName = existingCounterpartyResponse.get("counterparty").get("apiName");
- }
- }
- if(createdCounterPartyAPIName == "")
- {
- counterpartyMap = Map();
- counterpartyMap.put("name",vendorName);
- counterpartyMap.put("counterPartyType","vendor");
- createResponse = invokeurl
- [
- url :"https://contracts.zoho.in/api/v1/counterparties"
- type :POST
- parameters:counterpartyMap.toString()
- connection:"zcontractsconn"
- ];
- counterpartyDetail = createResponse.getJSON("counterparties").get(0);
- createdCounterPartyAPIName = counterpartyDetail.get("organizationApiName");
- customFields = List();
- cf = Map();
- cf.put("api_name","cf_contracts_counterparty_id");
- cf.put("value",createdCounterPartyAPIName);
- customFields.add(cf);
- updateMap = Map();
- updateMap.put("custom_fields",customFields);
- updateVendor = invokeurl
- [
- url :"https://books.zoho.in/api/v3/vendors/" + vendorID + "?organization_id=60047651581"
- type :PUT
- parameters:updateMap
- connection:"zbooks"
- ];
- }
- info "STEP 4 STARTED - Preparing Contract Variables";
- newContractType = "master-subscription-agreement-pro-plus";
- newContractName = "Agreement with " + vendorName;
- isNewContractTermIsDefinite = false;
- isNewContractRenewable = false;
- contractEffectiveDate = 1;
- info "Contract Type: " + newContractType;
- info "Contract Name: " + newContractName;
- info "Counterparty API Name: " + createdCounterPartyAPIName;
- 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}}}}};
- createContractResponse = invokeurl
- [
- url :"https://contracts.zoho.in/api/v1/createcontract"
- type :POST
- body:newContractDetail.toString()
- headers:{"Content-Type":"application/json"}
- connection:"zcontractsconn"
- ];
- info createContractResponse;
- result.put("counterpartyApiName",createdCounterPartyAPIName);
- result.put("contractResponse",createContractResponse);
- return result;
- }
Flow 2 – Contract Execution → Attach Signed Agreement
Trigger: Contract signing is completed in Zoho Contracts
Actions:
- Zoho Flow detects the contract execution event
- A custom function calls the Zoho Contracts API to download the executed contract document.
- The function identifies the corresponding vendor in Zoho Books.
- The executed agreement is automatically attached to the vendor record in Zoho Books.
Custom Function Snippet (Retrieve and Attach Signed Contract):
- map attachSignedContractToVendor(string contractApiName, string contractTitle)
- {
- result = Map();
- orgID = "60047651581";
- info "FLOW 2 STARTED";
- info contractApiName;
- info contractTitle;
- if(contractApiName.startsWith("contract/"))
- {
- contractApiName = contractApiName.replaceAll("contract/","");
- }
- info "Clean Contract API Name: " + contractApiName;
- if(contractTitle.startsWith("Agreement with "))
- {
- vendorName = contractTitle.subString(15);
- }
- else
- {
- vendorName = contractTitle;
- }
- info "Vendor Extracted: " + vendorName;
- vendorSearch = invokeurl
- [
- url :"https://books.zoho.in/api/v3/contacts?contact_name=" + vendorName + "&organization_id=" + orgID
- type :GET
- connection:"zbooks"
- ];
- info vendorSearch;
- contactsList = vendorSearch.get("contacts");
- if(contactsList == null || contactsList.size() == 0)
- {
- info "Vendor not found";
- result.put("status","vendor_not_found");
- return result;
- }
- vendorID = contactsList.get(0).get("contact_id");
- info "Vendor ID: " + vendorID;
- info "Downloading signed contract";
- signedFile = invokeurl
- [
- url :"https://contracts.zoho.in/api/v1/download/contracts/" + contractApiName + "/signed/document"
- type :GET
- connection:"zcontractsconn"
- ];
- info signedFile;
- fileMap = Map();
- fileMap.put("attachment",signedFile);
- fileMap.put("organization_id",orgID);
- info "Uploading attachment to Zoho Books";
- uploadResponse = invokeurl
- [
- url :"https://books.zoho.in/api/v3/contacts/" + vendorID + "/attachment?organization_id=" + orgID
- type :POST
- parameters:fileMap
- connection:"zbooks"
- content-type:"multipart/form-data"
- ];
- info uploadResponse;
- result.put("uploadResponse",uploadResponse);
- info "FLOW 2 COMPLETED";
- return result;
- }
Benefits
- This automation provides several advantages:
- Eliminates manual document handling
- Ensures finance teams always have access to executed agreements
- Connects legal and finance workflows
- Improves compliance and audit readiness
- 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
Recent Topics
Custom Related List Inside Zoho Books
Hello, We can create the Related list inside the zoho books by the deluge code, I am sharing the reference code Please have a look may be it will help you. //..........Get Org Details organizationID = organization.get("organization_id"); Recordid = cm_g_a_data.get("module_record_id");
Zoho Meeting - Feature Request - Introduce an option to use local date and time formating
Hi Zoho Meeting Team, My feature request is to add an option for dates to be displayed in the users local format. This is common practice across Zoho applications and particularly relevant to an application like Zoho Meeting which revolves around date
Cannot give public access to Html Snippet in Zoho Creator Page
Hi, I created a form in Zoho Creator and published it. The permalink works but I want to override the css of the form. (style based URL parameters is not good enough) So I created a page and added an Html snippet. I can now override the css, which is
How can Outlook 365 link back into Zoho Projects so meetings and events in Outlook calendar show in Zoho?
We use Outlook 365 for our emails and diaries and have integrated Zoho Projects with Office 365. One challenge we face is getting Zoho Projects to recognise when we have meetings and events in Outlook and not allow project managers to assign tasks over that period. Is there a way to resolve this? Thanks
On Edit Validation Blueprint
Hello, I have a notes field and a signature field. When the Approve button is clicked, the Signature field will appear and must be filled in. When the Reject button is clicked, the Notes field will appear and must be filled in. Question: Blueprint will
Zoho Invoice en Navarra (Spain)
Hola, ¿Alguien usa Zoho Invoice en la Comunidad Foral de Navarra? En Navarra tenemos un sistema tributario diferente y no aplica Verifactu (la Hacienda Foral de Navarra ha anunciado su alternativa, NaTicket, pero no ha informado cuándo entrará en vigor).
Emails from Zoho are getting blocked due to Zoho IP address being blacklisted
This is the info I got from my hosting provider – please address this issue immediately. I don’t expect this from such a big household name. Every single invoice I have sernt it not being received by my clients, all being blocked. All of a sudden. As
agentid : Where to find?
I've been looking around for this agenId to check for the total ticket assigned on a specific agent url :"https://desk.zoho.com/api/v1/ticketsCountByFieldValues?departmentId=351081000000155331&agentId=35108xxxxxx132009&field=statusType,status" type :GET
Zoho DataPrep integration with OpenAI (beta)
We are thrilled to announce Zoho DataPrep's integration with OpenAI. The public beta roll-out opens up three features. Users who configure their OpenAI Organizational ID and ChatGPT API key (Find out how) will be able access the features. The features
AI Bot and Advanced Automation for WhatsApp
Most small businesses "live" on WhatsApp, and while Bigin’s current integration is helpful, users need more automation to keep up with volume. We are requesting features based on our customer Feedbacks AI Bot: For auto-replying to FAQs. Keyword Triggers:
Setting total budget hours for a specific project
Hi there, I work on a lot of projects that have fixed budget hours. Is there a way to enter the total budgeted hours so i can track progress and identify when hours have been exceeded. I see in the projects dashboard there is a greyed out text saying
Clone entire dashboards
If users want to customize a dashboard that is used by other team members, they can't clone it in order to customize the copy. Instead they have to create the same dashboard again manually from scratch. Suggestion: Let users copy the entire dashboard
Introducing Formula Fields for performing dynamic calculations
Greetings, With the Formula Field, you can generate numerical calculations using provided functions and available fields, enabling you to derive dynamic data. You can utilize mathematical formulas to populate results based on the provided inputs. This
Getting started with Zoho PDF Editor
Hello users, If you are new to Zoho PDF Editor or aren't sure of its full potential, then this article is for you. Zoho PDF Editor is a free online PDF editing tool, that allows you to upload and edit PDFs, insert text and images, add fillable and e-signature
Zoho Projects - Cloning a task does not trigger task workflow when created
Hello! I have a Project where my team uses a set of tasks from a tasklist as templates, so we could simply clone it and drag it to another list in kanban view to avoid creating a new one from scratch. The process works well, but after cloning it the new
Purchase Orders not in sequence
I am unable to sort by Purchase Order Numbers. I can only sort by date; however, the PO numbers aren't in the order they were entered. This was not the case prior to today.
Internal Fillable Contract with Zoho Writer (Before Sending to Client)
Hi everyone, I’m trying to automate the following process in Zoho CRM and would appreciate some guidance. Process: When a Deal moves to a specific stage, CRM triggers an automation. CRM sends a contract template to an internal team member so they can
Date/time displayed in ZohoCRM does not match date/time of entries in ZohoForm
Hello there, we use a ZohoForm as a worksheet, i.e. users use it to track start time, break and stop time for every working day. The ZohoCRM org time zone is set on GM -4, so is the Time Zone in the Date&Time section in ZohoForm (see attachment). Despite
Update Existing Records greyed out in Free Version
Trying to update records from an Excel sheet, and not getting the option to update. Only option is to add as new accounts. All documentation I can see says update should be an option! Accounts, Leads, Contacts, all the same.
Dynamically Populate Picklist Values from Another Module Using Client Script
I am working in Zoho CRM and trying to dynamically populate a picklist field in the Partners module using values stored in another custom module. I have two modules: 1. Partners Module Field: Partner_Type_Pick Field Type: Picklist 2. Partners_Type Module
Add zoho calendar to google calendar
Hi I keep seeing instructions on how to sync Zoho CRM calendar with google calendar but no instructions on how to view Zoho calendar in my google calendar.
Zoho Community Digest : Jan 2026 | Part 1
Hello Everyone! Staying in the loop with Zoho's latest product updates and features across the vast Zoho Community Forums can be a real challenge. We get it. With over 50+ applications, each with its dedicated forum, it's easy to miss out on important
World date & time format
Hello, Is there a timeline to get the worldwide used date and time format ? I mean not the american one... I mean day month year, and 24 hours clock. Regards
Nimble enhancements to WhatsApp for Business integration in Zoho CRM: Enjoy context and clarity in business messaging
Dear Customers, We hope you're well! WhatsApp for business is a renowned business messaging platform that takes your business closer to your customers; it gives your business the power of personalized outreach. Using the WhatsApp for Business integration
Conditional layouts - support for multi-select picklists
Hi, The documentation for conditional layouts says the following: "Layout Rules cannot be used on the following field types: Auto Number Lookup Multi Select Lookup User Lookup Formula File Upload Multi Line" I have a custom module with a multi-pick list
Dont want to list inactive items.
If an item is made inactive, there is no point in showing it in the item list. Please provide an option to hide all inactive items in 'Preferences'.
Actual vs Minimum
Hi all, I am sure I am not the only one having this need. We are implementing billing on a 30-minute increment, with a minimum of 30 minutes per ticket. My question is, is there a way to create a formula or function to track both the minimum bill vs the
Client Script Not Working When Field is Set by Workflow
Problem Context: I have implemented a client script in the Cases module that automatically assigns commands based on the value of the Priority field. The script functions correctly when the Priority field is manually set by a user through the form. Observed
Integration of CRM and Recruit
hi team, Is it possible to sync deals <> job openings from only 1 pipeline? My configuration of CRM has pipeline for each business unit, so I will have all data in the CRM system. body leasing and recruitment is one BU (hence 1 pipeline) - can I sync
{Action Required} Re-authenticate your Google Accounts to Continue Data Sync
Hello Users! To align with Google’s latest updates on how apps access files in Google Drive, we’ve enhanced our integration to comply with the updated security and privacy standards, ensuring safer and more reliable access to your data. With this update,
integrating Zoho CRM vendors with Zoho projects
In most of our projects we collaborate with our Vendors. Being able to integrate only Accounts and not Vendors from CRM, is a huge limitation for our perspective and needs. We would really love to see this feature in the CRM-Projects integration.
Zoho Creator Workshops 2026—Europe & UK | Coming to a city near you!
Hello everyone! We're excited to announce the Zoho Creator Workshop Series 2026, coming to cities across Europe and the United Kingdom this year! Whether you're looking to explore the intermediate-to-advanced capabilities of Creator or you're a seasoned
Validation rule for Date field
The condition settings for a Date field are are absolutlly usless. Conditions can only be set for a specific date, which is logically ineffective in most cases. When setting a condition for a Date field, users usually need to compare the value relative
Number 9 envelopes for invoice printing
I email and print invoices. Being new to Zoho and coming from QB, we did both as we have a more traditional So in Zoho i want to do the same using Number 9 envelopes. These have both a return window and mail to windoow see attached image. Im just looking for best suggestions on how to get a ZOHO invoice to work, so I can mail my invoices...
Zoho Books/Square integration, using 2 Square 'locations' with new Books 'locations'?
Hello! I saw some old threads about this but wasn't sure if there were any updates. Is there a way to integrate the Square locations feature with the Books locations feature? As in, transactions from separate Books locations go to separate Square locations
Open Sans Font in Zoho Books is not Open Sans.
Font choice in customising PDF Templates is very limited, we cannot upload custom fonts, and to make things worse, the font names are not accurate. I selected Open Sans, and thought the system was bugging, but no, Open Sans is not Open Sans. The real
Super Admin Logging in as another User
How can a Super Admin login as another user. For example, I have a sales rep that is having issues with their Accounts and I want to view their Zoho Account with out having to do a GTM and sharing screens. Moderation Update (8th Aug 2025): We are working
Add Reporting feature to display variance/change columns when comparing periods
When running reports to compare periods (for example, Profit and Loss comparing current year to previous), I would like to be able to display variance columns in both (a) amount or (b) percentage.
Payroll and BAS ( Australian tax report format )
Hello , I am evaluating Zoho Books and I find the interface very intuitive and straight forward. My company is currently using Quickbooks Premier the Australian version. Before we can consider moving the service we would need to have the following addressed : 1.Payroll 2.BAS ( business activity statement ) for tax purposes 3.Some form of local backup and possible export of data to a widely accepted format. Regards Codrin Mitin
Invalid scope choice: Workdrive integration in CRM
Bug: There is an invalid option in the permission choices for Workdrive integration in CRM. If the entry "WorkDrive.teamfolder.CREATE" is selected, it will return a message indicating invalid OAuth scope scope does not exist.
Next Page