npm package: @nestr/n8n-nodes-nestr
Description: n8n community node for Nestr integration - manage projects, roles, circles, and more
Author: Nestr Development Team
Latest version: 0.0.28

# n8n-nodes-nestr

This is an n8n community node that provides integration with Nestr, allowing you to interact with the Nestr API directly from your n8n workflows.

## Installation

### Method 1: GUI Installation (Recommended)

1. **Open your n8n instance** and go to **Settings** → **Community nodes**
2. **Click "Install community nodes"**
3. **Enter the package name**: `@nestr/n8n-nodes-nestr`
4. **Check the risk acknowledgment** checkbox
5. **Click "Install"**

The node will be installed and available immediately in your n8n workflows.

### Method 2: Manual npm Installation

For self-hosted n8n instances, you can also install manually:

```bash
# Navigate to your n8n installation
cd ~/.n8n

# Install the community node
npm install @nestr/n8n-nodes-nestr
```

Then restart your n8n instance.

## Prerequisites

### For n8n Cloud Users

This node uses a centralized OAuth application. Simply:

1. **Configure Credentials in n8n:**
   - Go to **Credentials** in your n8n Cloud instance
   - Create new **"Nestr OAuth2 API"** credentials
   - Click **"Connect my account"** to start the OAuth flow
   - You'll be redirected to Nestr to authorize the connection
   - After authorization, you'll be redirected back to n8n
   - Test the connection to ensure it works

### For Self-Hosted n8n Users

You need to configure environment variables for the centralized OAuth app:

1. **Set Environment Variables:**
   
   For Docker:
   ```bash
   docker run -e NESTR_CLIENT_ID="your_nestr_client_id" \
              -e NESTR_CLIENT_SECRET="your_nestr_client_secret" \
              n8nio/n8n:latest
   ```
   
   For Kubernetes (add to deployment.yaml):
   ```yaml
   env:
     - name: NESTR_CLIENT_ID
       valueFrom:
         secretKeyRef:
           name: nestr-oauth-credentials
           key: client-id
     - name: NESTR_CLIENT_SECRET
       valueFrom:
         secretKeyRef:
           name: nestr-oauth-credentials
           key: client-secret
   ```
   
   For local development:
   ```bash
   export NESTR_CLIENT_ID="your_nestr_client_id"
   export NESTR_CLIENT_SECRET="your_nestr_client_secret"
   ```

2. **Install the community node** using the GUI or npm method above

3. **Restart n8n** to load the environment variables

3. **Configure Credentials in n8n:**
   - Go to **Credentials** in your n8n instance
   - Create new **"Nestr OAuth2 API"** credentials
   - The Client ID and Secret will be automatically loaded from environment variables
   - Test the connection to ensure it works

**Note:** Contact the node maintainer to get the correct Client ID and Secret values for your environment.

## Operations

### Nestr Node

The main Nestr node supports the following resources and operations:

#### Project
- **Create**: Create a new project
- **Update**: Update an existing project
- **Delete**: Delete a project
- **Get**: Get a specific project
- **Get All**: Get all projects in a workspace

#### Role
- **Create**: Create a new role
- **Update**: Update an existing role
- **Delete**: Delete a role
- **Get**: Get a specific role
- **Get All**: Get all roles

#### Circle
- **Create**: Create a new circle
- **Update**: Update an existing circle
- **Delete**: Delete a circle
- **Get**: Get a specific circle
- **Get All**: Get all circles

#### Post
- **Create**: Create a new post
- **Update**: Update an existing post
- **Delete**: Delete a post
- **Get**: Get a specific post
- **Get All**: Get all posts

#### Nest
- **Create**: Create a new nest
- **Update**: Update an existing nest
- **Delete**: Delete a nest
- **Get**: Get a specific nest
- **Get All**: Get all nests

#### Workspace
- **Get**: Get workspace information
- **Get All**: Get all workspaces
- **Get Labels**: Get workspace labels
- **Get Users**: Get workspace users

### Nestr Trigger Node

The Nestr Trigger node supports webhook-based triggers for real-time events:

- Project Created/Updated/Deleted
- Role Created/Updated/Deleted
- Circle Created/Updated/Deleted
- Post Created/Updated/Deleted

## Credentials

This node uses OAuth2 authentication. You'll need to configure:

1. **Authorization URL**: Your Nestr domain's OAuth authorization endpoint
2. **Access Token URL**: Your Nestr domain's OAuth token endpoint
3. **Client ID**: Your Nestr application's client ID
4. **Client Secret**: Your Nestr application's client secret
5. **Domain**: Your Nestr API domain

## Configuration

1. Set up OAuth2 credentials in n8n with your Nestr application details
2. Configure the appropriate domain for your Nestr instance
3. Use the nodes in your workflows to interact with Nestr resources

## Development

To build and develop this node:

```bash
# Install dependencies
npm install

# Build the node
npm run build

# Watch for changes during development
npm run dev
```

## Based on Zapier Integration

This n8n node is based on the existing Zapier CLI integration for Nestr, providing equivalent functionality in the n8n ecosystem.

## License

MIT