A complete QuickBooks Online direct API integration skill for OpenClaw providing full access to accounting, invoicing, customer management, inventory, payments, and financial reporting through the Intuit QuickBooks API.
This skill enables OpenClaw to interact with QuickBooks Online for:
http://localhost:3001/callback
cd "c:\Users\Shaun\Desktop\Quickbooks skill"
npm install
Required packages:
axios - HTTP client for API requests
express - OAuth callback server
open - Browser automation for OAuth
Create config.json from template:
cp config.json.template config.json
Edit config.json with your QuickBooks app credentials:
{
"client_id": "YOUR_CLIENT_ID_HERE",
"client_secret": "YOUR_CLIENT_SECRET_HERE",
"redirect_uri": "http://localhost:3001/callback",
"api_environment": "sandbox",
"access_token": "",
"refresh_token": "",
"realm_id": "",
"token_expiry": 0
}
For OpenClaw:
Add to your OpenClaw configuration:
{
"skills": {
"quickbooks": {
"path": "~/.openclaw/workspace/skills/Quickbooks-openclaw",
"enabled": true,
"autoStart": true
}
}
}
qb_authenticate tool with your credentials:
Use qb_authenticate with client_id and client_secret
config.json
qb_authenticate
Initiate OAuth2 authentication flow.
Parameters:
client_id (required): Your QuickBooks app Client ID
client_secret (required): Your QuickBooks app Client Secret
redirect_uri (optional): OAuth redirect URI (default: http://localhost:3001/callback)
Example:
{
"client_id": "ABxxxxxxxxxxxxxxxxxxxx",
"client_secret": "xxxxxxxxxxxxxxxxxx"
}
qb_create_customer
Create a new customer.
Parameters:
DisplayName (required): Customer display name
CompanyName: Company name
GivenName: First name
FamilyName: Last name
PrimaryEmailAddr: Email address object
PrimaryPhone: Phone number object
BillAddr: Billing address object
ShipAddr: Shipping address object
Example:
{
"DisplayName": "Acme Corporation",
"PrimaryEmailAddr": {
"Address": "billing@acme.com"
}
}
qb_get_customer
Get customer details by ID.
Parameters:
customer_id (required): Customer ID
qb_query_customers
Query customers using SQL syntax.
Parameters:
query: SQL query string (default: "SELECT * FROM Customer")
Example:
{
"query": "SELECT * FROM Customer WHERE Active = true"
}
qb_create_invoice
Create a new invoice.
Parameters:
CustomerRef (required): Customer reference object
Line (required): Array of line items
TxnDate: Transaction date (YYYY-MM-DD)
DueDate: Due date (YYYY-MM-DD)
CustomerMemo: Message to customer
BillEmail: Email address for invoice
Example:
{
"CustomerRef": { "value": "123" },
"Line": [{
"Amount": 500.00,
"DetailType": "SalesItemLineDetail",
"SalesItemLineDetail": {
"ItemRef": { "value": "1" },
"Qty": 10,
"UnitPrice": 50.00
}
}],
"DueDate": "2026-03-15"
}
qb_get_invoice
Get invoice by ID.
Parameters:
invoice_id (required): Invoice ID
qb_send_invoice
Send invoice via email.
Parameters:
invoice_id (required): Invoice ID
email (required): Recipient email address
qb_query_invoices
Query invoices using SQL syntax.
Parameters:
query: SQL query string
Example:
{
"query": "SELECT * FROM Invoice WHERE Balance > 0"
}
qb_create_item
Create a new product or service item.
Parameters:
Name (required): Item name
Type (required): Item type (Service, Inventory, NonInventory)
Description: Item description
UnitPrice: Sales price
IncomeAccountRef: Income account reference
ExpenseAccountRef: Expense account reference (for inventory)
QtyOnHand: Quantity on hand (for inventory)
Example:
{
"Name": "Consulting Services",
"Type": "Service",
"UnitPrice": 150.00,
"IncomeAccountRef": { "value": "79" }
}
qb_get_item
Get item by ID.
Parameters:
item_id (required): Item ID
qb_query_items
Query items using SQL syntax.
Parameters:
query: SQL query string
qb_create_payment
Record a payment received.
Parameters:
CustomerRef (required): Customer reference
TotalAmt (required): Total payment amount
TxnDate: Transaction date
Line: Array of payment line items linking to invoices
PaymentMethodRef: Payment method reference
Example:
{
"CustomerRef": { "value": "123" },
"TotalAmt": 500.00,
"Line": [{
"Amount": 500.00,
"LinkedTxn": [{
"TxnId": "456",
"TxnType": "Invoice"
}]
}]
}
qb_query_payments
Query payments using SQL syntax.
qb_get_profit_loss
Generate Profit & Loss report.
Parameters:
start_date (required): Start date (YYYY-MM-DD)
end_date (required): End date (YYYY-MM-DD)
Example:
{
"start_date": "2026-01-01",
"end_date": "2026-01-31"
}
qb_get_balance_sheet
Generate Balance Sheet report.
Parameters:
date (required): Report date (YYYY-MM-DD)
qb_get_cash_flow
Generate Cash Flow report.
Parameters:
start_date (required): Start date
end_date (required): End date
qb_get_aged_receivables
Generate Aged Receivables (A/R Aging) report.
Parameters: None
qb_get_aged_payables
Generate Aged Payables (A/P Aging) report.
Parameters: None
qb_create_vendor
Create a new vendor.
Parameters:
DisplayName (required): Vendor display name
CompanyName: Company name
PrimaryEmailAddr: Email address object
PrimaryPhone: Phone number object
qb_create_bill
Create a bill for a vendor.
Parameters:
VendorRef (required): Vendor reference
Line (required): Array of bill line items
TxnDate: Transaction date
DueDate: Due date
qb_query_vendors
Query vendors using SQL syntax.
qb_create_estimate
Create a new estimate/quote.
Parameters:
CustomerRef (required): Customer reference
Line (required): Array of line items
TxnDate: Transaction date
ExpirationDate: Expiration date
qb_query_estimates
Query estimates using SQL syntax.
qb_create_purchase_order
Create a purchase order.
Parameters:
VendorRef (required): Vendor reference
Line (required): Array of PO line items
qb_create_sales_receipt
Create a sales receipt (cash sale).
Parameters:
CustomerRef (required): Customer reference
Line (required): Array of line items
TxnDate: Transaction date
qb_query_accounts
Query chart of accounts.
Parameters:
query: SQL query string
Example:
{
"query": "SELECT * FROM Account WHERE AccountType = 'Income'"
}
qb_get_company_info
Get company information.
Parameters: None
qb_query
Execute any SQL query against QuickBooks entities.
Parameters:
query (required): SQL query string
Example:
{
"query": "SELECT * FROM Customer WHERE Balance > 100 ORDER BY DisplayName"
}
Supported Entities:
Account, Bill, BillPayment, Class, CreditMemo, Customer, Department, Deposit, Employee, Estimate, Invoice, Item, JournalEntry, Payment, PaymentMethod, Purchase, PurchaseOrder, RefundReceipt, SalesReceipt, TaxCode, TaxRate, Term, TimeActivity, Transfer, Vendor, VendorCredit
qb_batch
Execute multiple operations in a single batch request.
Parameters:
operations (required): Array of batch operations
Example:
{
"operations": [
{
"bId": "bid1",
"operation": "create",
"entity": "Customer",
"data": { "DisplayName": "Customer 1" }
},
{
"bId": "bid2",
"operation": "query",
"query": "SELECT * FROM Invoice WHERE Balance > 0"
}
]
}
1. First, create or find a customer:
"Find customer with name 'Acme Corp' using qb_query_customers"
2. Create an invoice:
"Create an invoice for customer ID 123 with consulting services
for 10 hours at $150/hour, due in 30 days"
3. Send the invoice:
"Send invoice 456 to billing@acme.com"
1. Get month-end reports:
"Show me the profit and loss for January 2026"
2. Check cash flow:
"What's the cash flow for last quarter?"
3. Review outstanding receivables:
"Show me the aged receivables report"
1. Check low stock items:
"Query items where quantity on hand is less than 10"
2. Create reorder purchase order:
"Create a purchase order for vendor 789 to reorder low stock items"
3. Update item prices:
"Update the price of item 'Widget Pro' to $299.99"
QuickBooks uses a SQL-like query language:
SELECT * FROM Customer WHERE Active = true
SELECT * FROM Invoice WHERE Balance > 0 AND DueDate < '2026-03-01'
SELECT * FROM Customer WHERE DisplayName LIKE '%Corp%'
SELECT * FROM Invoice ORDER BY TxnDate DESC
SELECT *, MAXRESULTS 50 FROM Customer
SELECT * FROM Item WHERE Type = 'Inventory' AND QtyOnHand < 10
The skill provides detailed error messages:
All configuration is stored in config.json. This file contains both your app credentials (Client ID and Secret) and the OAuth tokens that are saved after authentication.
The skill supports both Sandbox and Production environments via the api_environment setting in config.json:
To switch environments, update config.json:
{
"api_environment": "sandbox" // or "production"
}
Important: Production mode requires your app to be verified by Intuit. Start with sandbox for development.
⚠️ Credential Storage: This skill stores OAuth tokens and client secrets in plaintext in config.json on your local filesystem. To enhance security:
config.json (read/write for owner only)
config.json to version control (included in .gitignore)
autoStart until you've verified the skill behaves as expected
The skill automatically handles rate limiting with proper error messages.
config.json (excluded from git)
Run qb_authenticate with your credentials.
Delete config.json and re-authenticate.
Ensure redirect URI in config matches your QuickBooks app settings.
Change port in code or kill the process using port 3000.
For more troubleshooting, see TROUBLESHOOTING.md.
Contributions welcome! Please:
MIT License - See LICENSE file for details.
Current Version: 1.0.1
Last Updated: February 21, 2026
Node.js Required: 18.0.0+
accounting quickbooks invoicing payments financial-reporting bookkeeping erp business intuit api-integration mcp-skill openclaw
Ready to use! Run npm install and authenticate to get started.
共 1 个版本