Zoho Books ACTION
Create Invoice
Creates an invoice for your customer. See the documentation
- Action
- Writes data
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Zoho Books account once, then configure and run Create Invoice from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "zoho_books-create-invoice",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
zoho_books: { authProvisionId: "apn_xxxxxxx" },
customerId: "Customer Id",
invoiceNumber: "Invoice Number",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "zoho_books-create-invoice",
"configured_props": {
"zoho_books": { "authProvisionId": "apn_xxxxxxx" },
"customerId": "Customer Id",
"invoiceNumber": "Invoice Number"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "zoho_books",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "zoho_books-create-invoice",
arguments: {
customerId: "Customer Id",
invoiceNumber: "Invoice Number",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
customerId Customer Id | string | ID of the customer the invoice has to be created. Required Dynamic |
invoiceNumber Invoice Number | string | Search invoices by invoice number. Max-length [100] Optional |
placeOfSupply Place Of Supply | string | Place where the goods/services are supplied to. (If not given, place of contact given for the contact will be taken). Optional |
vatTreatment VAT Treatment | string | Enter vat treatment. Optional |
referenceNumber Reference Number | string | The reference number of the invoice. Optional |
templateId Template Id | string | ID of the pdf template associated with the invoice. Optional Dynamic |
date Date | string | Search invoices by invoice date. Default date format is yyyy-mm-dd. Optional |
paymentTerms Payment Terms | integer | Payment terms in days e.g. 15, 30, 60. Invoice due date will be calculated based on this. Max-length [100] Optional |
paymentTermsLabel Payment Terms Label | string | Used to override the default payment terms label. Default value for 15 days is "Net 15 Days". Max-length [100] Optional |
dueDate Due Date | string | Search invoices by due date. Default date format is yyyy-mm-dd. Variants: due_date_start, due_date_end, due_date_before and due_date_after Optional |
discount Discount | string | Discount applied to the invoice. It can be either in % or in amount. e.g. 12.5% or 190. Max-length [100] Optional |
isDiscountBeforeTax Is Discount Before Tax | boolean | Used to specify how the discount has to applied. Either before or after the calculation of tax. Optional |
discountType Discount Type | string | How the discount is specified. Allowed values are entity_level or item_level. Optional |
isInclusiveTax Is Inclusive Tax | boolean | Used to specify whether the line item rates are inclusive or exclusive of tax. Optional |
exchangeRate Exchange Rate | string | Exchange rate of the currency. Optional |
recurringInvoiceId Recurring Invoice Id | string | ID of the recurring invoice from which the invoice is created. Optional Dynamic |
invoicedEstimateId Invoiced Estimate Id | string | ID of the invoice from which the invoice is created. Optional |
salespersonName Salesperson Name | string | Name of the sales person. Optional |
customFields Custom Fields | string[] | A list of custom fields objects for an invoice. Example: {"customfield_id": 123123, "value": "value"} Optional |
lineItems Line Items | string[] | A list of line items objects of an estimate. Example: {"item_id": "1352827000000156060", "notes": "note", "name": "Item name", "quantity": "1" } See the documentation for further details. Optional |
paymentOptions Payment Options | object | Payment options for the invoice, online payment gateways and bank accounts. Will be displayed in the pdf. Example: {"payment_gateways": ["configured": true, "additional_field1": "standard", "gateway_name": "paypal"]} See the documentation for further details. Optional |
allowPartialPayments Allow Partial Payments | boolean | Boolean to check if partial payments are allowed for the contact Optional |
customBody Custom Body | string | Optional |
customSubject Custom Subject | string | Optional |
notes Notes | string | The notes added below expressing gratitude or for conveying some information. Optional |
terms Terms | string | The terms added below expressing gratitude or for conveying some information. Optional |
shippingCharge Shipping Charge | string | Shipping charges applied to the invoice. Optional |
adjustment Adjustment | string | Optional |
adjustmentDescription Adjustment Description | string | Optional |
reason Reason | string | Optional |
taxAuthorityId Tax Authority Id | string | ID of the tax authority. Tax authority depends on the location of the customer. For example, if the customer is located in NY, then the tax authority is NY tax authority. Optional Dynamic |
taxExemptionId Tax Exemption Id | string | ID of the tax exemption. Optional Dynamic |
taxId Tax Id | string | ID of the tax. Optional Dynamic |
expenseId Expense Id | string | Optional Dynamic |
salesorderItemId Salesorder Item Id | string | ID of the sales order line item which is invoices. Optional |
avataxTaxCode Avatax Tax Code | string | A tax code is a unique label used to group Items (products, services, or charges) together. Refer the [link][2] for more deails. Max-length [25] Optional |
timeEntryIds Time Entry Ids | string[] | IDs of the time entries associated with the project. Optional Dynamic |
send Send | boolean | Send the estimate to the contact person(s) associated with the estimate. Optional |
ignoreAutoNumberGeneration Ignore Auto Number Generation | boolean | Ignore auto estimate number generation for this estimate. This mandates the estimate number. Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- zoho_books-create-invoice
- Version
- 0.3.1
- App
- Zoho Books
- Authentication
- OAuth
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗