Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
extraFileExtensions: ['.json'],
},

ignorePatterns: ['.eslintrc.js', '**/*.js', '**/node_modules/**', '**/dist/**'],
ignorePatterns: ['.eslintrc.js', '**/*.js', '**/node_modules/**', '**/dist/**', '**/archive/**'],

overrides: [
{
Expand Down
64 changes: 4 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ A powerful n8n Community Node for seamless integration with Confluence Cloud RES
- **Built-in Error Handling**: Comprehensive error messages with actionable solutions
- **OpenAPI-Generated**: Automatically generated from official Confluence API specifications

### 🎯 **Confluence Cloud Trigger**
- **Real-time Content Monitoring**: Poll for new or updated content
- **Flexible Filtering**: Filter by spaces, labels, authors, and content types
- **Template-based Configuration**: Easy setup with pre-configured templates
- **Custom CQL Support**: Advanced users can write custom Confluence Query Language expressions
- **Smart Time Handling**: Configurable lookback periods for initial runs

### 🛡️ **Quality Assurance**
- **Deprecated API Detection**: Build fails if deprecated APIs are detected
- **Missing Route Validation**: Automatic validation of API route configurations
Expand Down Expand Up @@ -124,38 +117,6 @@ Create a **Confluence Cloud API** credential with:



## 🎯 Trigger Configuration

### Template Options

| Template | Description | CQL Generated |
|----------|-------------|---------------|
| **New Pages** | Monitor newly created pages | `type = page AND created >= now("-1h")` |
| **Updated Pages** | Monitor modified pages | `type = page AND lastModified >= now("-1h")` |
| **New or Updated Pages** | Monitor all page changes | `type = page AND (created >= now("-1h") OR lastModified >= now("-1h"))` |


### Filter Options

| Filter | Type | Description | Example |
|--------|------|-------------|---------|
| **Space Keys** | String | Comma-separated space keys | `DOCS, TEAM, HELP` |
| **Labels** | String | Comma-separated labels | `urgent, review, draft` |
| **Author** | String | Confluence Account ID | `99:27935d01-XXXX-XXXX-XXXX-a9b8d3b2ae2e` |
| **Initial Lookback** | Select | How far back to look initially | `1h, 6h, 12h, 1d, 3d, 1w, 2w, 1month` |

### Advanced: Custom CQL

For power users, write custom Confluence Query Language expressions:

```cql
space in ("DOCS", "TEAM") AND
type = page AND
(label = "urgent" OR label = "review") AND
creator = "99:27935d01-XXXX-XXXX-XXXX-a9b8d3b2ae2e" AND
created >= now("-1w")
```

## 💡 Usage Examples

### Example 1: Create a New Page
Expand All @@ -176,19 +137,7 @@ created >= now("-1w")
}
```

### Example 2: Monitor New Pages in Specific Spaces

```javascript
// Trigger Configuration
{
"queryType": "template",
"template": "new_pages",
"spaceKeys": "DOCS, ENGINEERING",
"initialLookback": "1d"
}
```

### Example 3: List All Spaces
### Example 2: List All Spaces

```javascript
// Simple space listing
Expand Down Expand Up @@ -219,11 +168,8 @@ npm install
# Build the project
npm run build

# Run tests
npm test

# Format code
npm run format
# Build and run in dev mode
npm run dev # then open browser with http://localhost:5678
```

### Architecture
Expand Down Expand Up @@ -257,7 +203,7 @@ Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md)
"legacy": false
}
```
3. Run `npm run build` to generate operations
3. Run `npm run dev` to generate operations
4. Test your changes

## 📋 API Compatibility
Expand All @@ -266,8 +212,6 @@ Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md)
|---------------------|----------------|-------|
| **REST API v2** | ✅ Full Support | Primary API version |
| **REST API v1** | 🟡 Legacy Support | For operations not yet in V2 |
| **Content API** | ✅ Supported | Via V2 endpoints |
| **Space API** | ✅ Supported | Both V1 and V2 |

## 🐛 Troubleshooting

Expand Down
12 changes: 12 additions & 0 deletions archive/ConfluenceCloudTrigger.node.json_a
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"node": "n8n-nodes-base.ConfluenceCloudTrigger",
"nodeVersion": "1.0",
"codexVersion": "1.0",
"categories": ["Development", "Productivity"],
"credentials": [
{
"name": "confluenceCloudApi",
"displayName": "Confluence Cloud API"
}
]
}
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function copyIcons() {

// ESLint (for credentials and nodes)
function lint(done) {
const eslint = spawn('npx', ['eslint', '--fix', 'credentials/**/*.ts', 'nodes/**/*.ts'], { stdio: 'inherit' });
const eslint = spawn('npx', ['eslint', '--fix', 'credentials/**/*.ts', '--ignore-pattern', '!nodes/**/*.ts'], { stdio: 'inherit' });
eslint.on('close', (code) => {
if (code === 0) {
console.log('✅ ESLint passed');
Expand Down
4 changes: 0 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
module.exports = {
...require('./dist/nodes/ConfluenceCloud/ConfluenceCloud.node.js'),
...require('./dist/credentials/ConfluenceCloudApi.credentials.js'),
};
5 changes: 4 additions & 1 deletion nodes/ConfluenceCloud/ConfluenceCloud.node.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"node": "dist/nodes/ConfluenceCloud/ConfluenceCloud.node.js",
"node": "n8n-nodes-base.ConfluenceCloud",
"nodeVersion": "1.0",
"codexVersion": "1.0",
"categories": ["Development", "Productivity"],
"credentials": [
{
"name": "confluenceCloudApi",
Expand Down
9 changes: 0 additions & 9 deletions nodes/ConfluenceCloud/ConfluenceCloudTrigger.node.json

This file was deleted.

13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"name": "n8n-nodes-confluence-cloud",
"version": "1.2.5",
"name": "@conciso/n8n-nodes-confluence-cloud",
"version": "1.2.14",
"description": "n8n node for Confluence Cloud REST API integration",
"publishConfig": {
"access": "public"
},
"keywords": [
"n8n-community-node-package",
"confluence",
Expand Down Expand Up @@ -38,17 +41,15 @@
"release:major": "gulp releaseMajor"
},
"files": [
"dist",
"index.js"
"dist"
],
"n8n": {
"n8nNodesApiVersion": 1,
"credentials": [
"dist/credentials/ConfluenceCloudApi.credentials.js"
],
"nodes": [
"dist/nodes/ConfluenceCloud/ConfluenceCloud.node.js",
"dist/nodes/ConfluenceCloud/ConfluenceCloudTrigger.node.js"
"dist/nodes/ConfluenceCloud/ConfluenceCloud.node.js"
]
},
"devDependencies": {
Expand Down
57 changes: 29 additions & 28 deletions scripts/openapi-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,38 +271,39 @@ export const mainProperties = [
const nodeCode = `"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConfluenceCloud = void 0;
const n8n_workflow_1 = require("n8n-workflow");

class ConfluenceCloud {
description = {
displayName: 'Confluence Cloud',
name: 'confluenceCloud',
icon: 'file:confluence.svg',
group: ['output'],
version: 1,
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Zugriff auf die Confluence Cloud REST API - Auto-generated from OpenAPI',
defaults: {
name: 'Confluence Cloud',
},
inputs: [n8n_workflow_1.NodeConnectionType.Main],
outputs: [n8n_workflow_1.NodeConnectionType.Main],
usableAsTool: true,
credentials: [
{
name: 'confluenceCloudApi',
required: true,
constructor() {
this.description = {
displayName: 'Confluence Cloud',
name: 'confluenceCloud',
icon: 'file:confluence.svg',
group: ['output'],
version: 1,
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Access to the Confluence Cloud REST API - Auto-generated from OpenAPI',
defaults: {
name: 'Confluence Cloud',
},
],
requestDefaults: {
baseURL: '={{$credentials.domain}}',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
inputs: ["main"],
outputs: ["main"],
usableAsTool: true,
credentials: [
{
name: 'confluenceCloudApi',
required: true,
},
],
requestDefaults: {
baseURL: '={{$credentials.domain}}',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
},
},
properties: ${JSON.stringify(allProperties, null, 8)},
};
properties: ${JSON.stringify(allProperties, null, 8)},
};
}
}
exports.ConfluenceCloud = ConfluenceCloud;`;

Expand Down
59 changes: 4 additions & 55 deletions templates/README.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ A powerful n8n Community Node for seamless integration with Confluence Cloud RES
- **Built-in Error Handling**: Comprehensive error messages with actionable solutions
- **OpenAPI-Generated**: Automatically generated from official Confluence API specifications

### 🎯 **Confluence Cloud Trigger**
- **Real-time Content Monitoring**: Poll for new or updated content
- **Flexible Filtering**: Filter by spaces, labels, authors, and content types
- **Template-based Configuration**: Easy setup with pre-configured templates
- **Custom CQL Support**: Advanced users can write custom Confluence Query Language expressions
- **Smart Time Handling**: Configurable lookback periods for initial runs

### 🛡️ **Quality Assurance**
- **Deprecated API Detection**: Build fails if deprecated APIs are detected
- **Missing Route Validation**: Automatic validation of API route configurations
Expand Down Expand Up @@ -64,33 +57,6 @@ Create a **Confluence Cloud API** credential with:

{{OPERATIONS_TABLE}}

## 🎯 Trigger Configuration

### Template Options

{{TRIGGER_TEMPLATES_TABLE}}

### Filter Options

| Filter | Type | Description | Example |
|--------|------|-------------|---------|
| **Space Keys** | String | Comma-separated space keys | `DOCS, TEAM, HELP` |
| **Labels** | String | Comma-separated labels | `urgent, review, draft` |
| **Author** | String | Confluence Account ID | `99:27935d01-XXXX-XXXX-XXXX-a9b8d3b2ae2e` |
| **Initial Lookback** | Select | How far back to look initially | `1h, 6h, 12h, 1d, 3d, 1w, 2w, 1month` |

### Advanced: Custom CQL

For power users, write custom Confluence Query Language expressions:

```cql
space in ("DOCS", "TEAM") AND
type = page AND
(label = "urgent" OR label = "review") AND
creator = "99:27935d01-XXXX-XXXX-XXXX-a9b8d3b2ae2e" AND
created >= now("-1w")
```

## 💡 Usage Examples

### Example 1: Create a New Page
Expand All @@ -111,19 +77,7 @@ created >= now("-1w")
}
```

### Example 2: Monitor New Pages in Specific Spaces

```javascript
// Trigger Configuration
{
"queryType": "template",
"template": "new_pages",
"spaceKeys": "DOCS, ENGINEERING",
"initialLookback": "1d"
}
```

### Example 3: List All Spaces
### Example 2: List All Spaces

```javascript
// Simple space listing
Expand Down Expand Up @@ -154,11 +108,8 @@ npm install
# Build the project
npm run build

# Run tests
npm test

# Format code
npm run format
# Build and run in dev mode
npm run dev # then open browser with http://localhost:5678
```

### Architecture
Expand Down Expand Up @@ -192,7 +143,7 @@ Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md)
"legacy": false
}
```
3. Run `npm run build` to generate operations
3. Run `npm run dev` to generate operations
4. Test your changes

## 📋 API Compatibility
Expand All @@ -201,8 +152,6 @@ Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md)
|---------------------|----------------|-------|
| **REST API v2** | ✅ Full Support | Primary API version |
| **REST API v1** | 🟡 Legacy Support | For operations not yet in V2 |
| **Content API** | ✅ Supported | Via V2 endpoints |
| **Space API** | ✅ Supported | Both V1 and V2 |

## 🐛 Troubleshooting

Expand Down
Loading