npm package: @joshuanode/n8n-nodes-quoter
Description: n8n community node for Quoter by ScalePad - Quote Management and Automation
Author: Joshua Smith
Latest version: 0.0.9

# n8n-nodes-quoter

[![npm version](https://badge.fury.io/js/@joshuanode/n8n-nodes-quoter.svg)](https://www.npmjs.com/package/@joshuanode/n8n-nodes-quoter)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![n8n Community Node](https://img.shields.io/badge/n8n-Community%20Node-4680C2)
[![TypeScript](https://img.shields.io/badge/TypeScript-4.x-blue)](https://www.typescriptlang.org/)
[![GitHub](https://img.shields.io/badge/GitHub-ajoshuasmith-181717?logo=github)](https://github.com/ajoshuasmith)

Community node for the **Quoter by ScalePad API** - Automate quote creation, management, and CRM integration for MSPs.

## Table of Contents

- [Features](#features)
- [Installation](#installation)
- [Credentials](#credentials)
- [Compatibility](#compatibility)
- [Operations](#operations)
  - [Item](#item)
  - [Quote](#quote)
  - [Customer](#customer)
  - [Template](#template)
- [Usage Examples](#usage-examples)
- [Development](#development)
- [License](#license)

## Features

| Feature | Description |
|---------|-------------|
| **Full CRUD Operations** | Complete create, read, update, delete support for all resources |
| **OAuth 2.0 Authentication** | Secure client credentials flow with automatic token refresh |
| **Field Selection** | Request only the fields you need for optimized API performance |
| **Automatic Pagination** | Handles multi-page responses up to 100 records per request |
| **Rate Limit Handling** | Detects and reports Quoter's 5 req/sec limit |
| **Expression Support** | All fields support n8n expressions for dynamic values |

## Installation

### Recommended: Via n8n Community Nodes

1. In n8n, navigate to **Settings > Community Nodes**
2. Click **Install a community node**
3. Enter `@joshuanode/n8n-nodes-quoter`
4. Click **Install**
5. Restart n8n

### Manual: Via npm

```bash
npm install @joshuanode/n8n-nodes-quoter
```

Then restart your n8n instance.

## Credentials

To use this node, you'll need Quoter OAuth 2.0 credentials.

### Getting Your API Credentials

1. Sign in to [Quoter](https://app.quoter.com)
2. Navigate to **Account > API Keys**
3. Click **Create API Key**
4. Save the **Client ID** and **Client Secret**

### Configuring in n8n

| Field | Description |
|-------|-------------|
| **Client ID** | Your OAuth Client ID from Quoter |
| **Client Secret** | Your OAuth Client Secret from Quoter |

> **Note:** Access tokens are valid for 1 hour and refresh automatically. No manual intervention needed.

## Compatibility

| n8n Version | Status |
|-------------|--------|
| 1.0.0+ | Supported |

## Operations

### Item

Manage products and services for quotes.

| Operation | Description |
|-----------|-------------|
| **Create** | Create a new item |
| **Get** | Retrieve an item by ID |
| **Get Many** | Retrieve multiple items with pagination |
| **Update** | Update an existing item |
| **Delete** | Delete an item |

**Supported Fields:**
- Name (required for create)
- Type (required for create: product/service)
- Description, Cost, Price, SKU

### Quote

Manage quote records and proposals.

| Operation | Description |
|-----------|-------------|
| **Create** | Create a new quote |
| **Get** | Retrieve a quote by ID |
| **Get Many** | Retrieve multiple quotes with pagination |
| **Update** | Update an existing quote |
| **Delete** | Delete a quote |

**Supported Fields:**
- Customer ID (required for create)
- Quote Name (required for create)
- Template ID, Notes, Valid Until
- Status (draft/sent/accepted/declined)

### Customer

Manage customer and client records.

| Operation | Description |
|-----------|-------------|
| **Create** | Create a new customer |
| **Get** | Retrieve a customer by ID |
| **Get Many** | Retrieve multiple customers with pagination |
| **Update** | Update an existing customer |
| **Delete** | Delete a customer |

**Supported Fields:**
- Name (required for create)
- Email, Phone, Address

### Template

Access reusable quote templates (read-only).

| Operation | Description |
|-----------|-------------|
| **Get** | Retrieve a template by ID |
| **Get Many** | Retrieve multiple templates with pagination |

## Usage Examples

### Example 1: Create a Quote from Template

1. Add the **ScalePad Quoter** node to your workflow
2. Select **Quote** as the resource
3. Select **Create** as the operation
4. Enter the Customer ID and Quote Name
5. In Additional Fields, set the Template ID and Valid Until date
6. Execute the workflow

### Example 2: Bulk Update Item Prices

1. Add a **ScalePad Quoter** node to get all items (Resource: Item, Operation: Get Many, Return All: true)
2. Add a **Function** node to calculate new prices
3. Add another **ScalePad Quoter** node (Resource: Item, Operation: Update) using the item ID and new price from the previous nodes

### Example 3: Create Customer and Quote in One Flow

1. Add a **ScalePad Quoter** node (Resource: Customer, Operation: Create) with company details
2. Add a second **ScalePad Quoter** node (Resource: Quote, Operation: Create) using the new customer ID from step 1

### Example 4: Get Items with Field Selection

1. Add the **ScalePad Quoter** node
2. Select **Item** as the resource
3. Select **Get Many** as the operation
4. Under Options, set Fields to `id,name,price,type`
5. Execute to retrieve only the fields you need

## Development

### Prerequisites

- Node.js >= 18.17.0
- npm
- n8n installed locally (for testing)

### Setup

```bash
# Clone the repository
git clone https://github.com/ajoshuasmith/n8n-nodes-quoter.git
cd n8n-nodes-quoter

# Install dependencies
npm install

# Build the node
npm run build

# Watch for changes during development
npm run dev

# Lint code
npm run lint

# Format code
npm run format
```

### Testing Locally

1. Build the node: `npm run build`
2. Link it to your n8n installation: `npm link`
3. In your n8n directory: `npm link @joshuanode/n8n-nodes-quoter`
4. Restart n8n

### Project Structure

```
n8n-nodes-quoter/
├── credentials/
│   └── ScalePadQuoterOAuth2Api.credentials.ts
├── nodes/
│   ├── shared/
│   │   ├── GenericFunctions.ts
│   │   └── types.ts
│   └── ScalePadQuoter/
│       ├── ScalePadQuoter.node.ts
│       ├── quoter.svg
│       └── descriptions/
│           ├── ItemDescription.ts
│           ├── QuoteDescription.ts
│           ├── CustomerDescription.ts
│           └── TemplateDescription.ts
├── package.json
├── tsconfig.json
├── gulpfile.js
└── README.md
```

## Resources

- [Quoter API Documentation](https://docs.quoter.com/api)
- [Quoter Support](https://support.quoter.com/)
- [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)
- [n8n Node Development Guide](https://docs.n8n.io/integrations/creating-nodes/)

## Related Packages

- [n8n-nodes-scalepad](https://www.npmjs.com/package/n8n-nodes-scalepad) - ScalePad Core API and Lifecycle Manager

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## License

[MIT](LICENSE)

## Support

If you encounter any issues or have questions:

- [Open an issue](https://github.com/ajoshuasmith/n8n-nodes-quoter/issues)
- Check the [Quoter API documentation](https://docs.quoter.com/api)