OpenProject integration for n8n - Manage projects, work packages, and time entries


A comprehensive n8n node for integrating with OpenProject API. This node allows you to manage projects, work packages, and time entries directly from your n8n workflows.
- Project Management: Create, read, update, and list projects
- Work Package Operations: Full CRUD operations for work packages
- Time Tracking: Create and manage time entries
- Dynamic Loading: Automatic loading of projects, users, and activities
- Error Handling: Robust error handling and validation
- OpenProject API v3: Full support for the latest OpenProject API
This node is available in the n8n Cloud marketplace. Simply search for "OpenProject" in the node library.
``bash`
npm install n8n-nodes-openproject
1. Create an API token in OpenProject:
- Go to your user profile in OpenProject
- Navigate to "Access Token"
- Create a new token with appropriate permissions
2. Configure credentials in n8n:
- Base URL: Your OpenProject instance URL (e.g., https://mi.openproject.local)
- API Token: The token you created in step 1
json
{
"resource": "workPackage",
"operation": "create",
"subject": "New Task",
"projectId": "1",
"type": "Task",
"description": "Task description",
"status": "New",
"priority": "Normal"
}
`$3
`json
{
"resource": "timeEntry",
"operation": "create",
"workPackageId": "1",
"hours": "PT2H",
"date": "2024-01-15",
"comment": "Work done on this task"
}
`Development Guide
$3
- Node.js: >= 16.0.0
- npm: >= 8.0.0
- Git: For version control
- OpenProject Instance: For testing (can be local or cloud)
$3
1. Clone the repository:
`bash
git clone https://gitlab.com/somitcoop/projects/coopflow/n8n-nodes-openproject.git
cd n8n-nodes-openproject
`2. Install dependencies:
`bash
npm install
`3. Verify installation:
`bash
npm run lint
`$3
#### Building the Node
`bash
Development build with watch mode
npm run devProduction build
npm run buildClean build (remove dist folder first)
rm -rf dist && npm run build
`#### Code Quality
`bash
Run linter
npm run lintFix linting issues automatically
npm run lintfixFormat code with Prettier
npm run format
`#### Testing Locally
1. Build the node:
`bash
npm run build
`2. Install in local n8n:
`bash
# Create custom nodes directory
mkdir -p ~/.n8n/custom/nodes/n8n-nodes-openproject
# Copy built files
cp -r dist/* ~/.n8n/custom/nodes/n8n-nodes-openproject/
cp package.json ~/.n8n/custom/nodes/n8n-nodes-openproject/
`3. Restart n8n:
`bash
# If using n8n locally
n8n start
# If using Docker
docker restart n8n
`4. Test in n8n:
- Open n8n in your browser
- Add the OpenProject node to a workflow
- Configure credentials
- Test different operations
#### Testing with Example Workflow
1. Import the example workflow:
- Open n8n
- Go to Workflows
- Click "Import from file"
- Select
src/nodes/OpenProject/example.json2. Configure credentials:
- Add your OpenProject API credentials
- Update the workflow parameters as needed
3. Run the workflow:
- Activate the workflow
- Monitor the execution
- Check the results
$3
`
src/
├── nodes/OpenProject/
│ ├── OpenProject.node.ts # Main node logic
│ ├── GenericFunctions.ts # API helper functions
│ ├── ProjectDescription.ts # Project resource configuration
│ ├── WorkPackageDescription.ts # Work Package resource configuration
│ ├── TimeEntryDescription.ts # Time Entry resource configuration
│ ├── openproject.svg # Node icon
│ ├── example.json # Example workflow
│ └── README.md # Node-specific documentation
├── credentials/
│ └── OpenProjectApi.credentials.ts # Credentials configuration
└── index.ts # Main entry pointdist/ # Built files (generated)
├── nodes/OpenProject/
│ └── OpenProject.node.js
└── credentials/
└── OpenProjectApi.credentials.js
`$3
#### TypeScript Configuration (
tsconfig.json)
- Target: ES2022
- Module: CommonJS
- Strict mode enabled
- Source maps for debugging#### Webpack Configuration (
webpack.config.js)
- Production mode for builds
- TypeScript loader
- Node.js target
- External dependencies for n8n#### Package Configuration (
package.json)
- n8n node metadata
- Build scripts
- Dependencies and devDependencies
- Publishing configurationPublishing Guide
$3
1. npm Account: Create an account at https://www.npmjs.com/signup
2. Unique Package Name: Ensure
n8n-nodes-openproject is available
3. Git Repository: All changes committed and pushed$3
#### 1. Prepare for Publishing
`bash
Ensure all changes are committed
git add .
git commit -m "Prepare for publishing v1.0.0"
git push origin mainVerify build works
npm run buildCheck package contents
npm pack --dry-run
`#### 2. Login to npm
`bash
Check if already logged in
npm whoamiIf not logged in, login
npm login
Enter your username, password, and email
`#### 3. Publish the Package
`bash
Publish to npm
npm publishFor scoped packages (if needed)
npm publish --access public
`#### 4. Verify Publication
`bash
Check if package is published
npm view n8n-nodes-openprojectInstall and test the published package
npm install n8n-nodes-openproject
`$3
#### Updating Versions
`bash
Patch version (bug fixes)
npm version patchMinor version (new features)
npm version minorMajor version (breaking changes)
npm version major
`#### Publishing Updates
`bash
After version bump
git add .
git commit -m "Release v1.0.1"
git push origin main
git push --tagsPublish new version
npm publish
`$3
#### Common Issues
1. Package name already taken:
`bash
# Check availability
npm view n8n-nodes-openproject
# If taken, update package.json with new name
# Example: n8n-nodes-openproject-custom
`2. Authentication issues:
`bash
# Re-login to npm
npm logout
npm login
`3. Build errors:
`bash
# Clean and rebuild
rm -rf dist node_modules package-lock.json
npm install
npm run build
`Contributing
$3
1. Fork the repository
2. Create a feature branch:
`bash
git checkout -b feature/amazing-feature
`3. Make your changes:
`bash
# Edit files
npm run dev # Watch mode for development
npm run lint # Check code quality
`4. Test your changes:
`bash
npm run build
# Test in local n8n instance
`5. Commit and push:
`bash
git add .
git commit -m "Add amazing feature"
git push origin feature/amazing-feature
`6. Create a Pull Request
$3
- TypeScript: Use strict mode
- ESLint: Follow linting rules
- Prettier: Use consistent formatting
- Testing: Test all new features
- Documentation: Update README for new features
$3
1. Clear description of changes
2. Test coverage for new features
3. Documentation updates if needed
4. No breaking changes without major version bump
5. Follow existing code style
API Reference
For more information about the OpenProject API, visit: https://www.openproject.org/docs/api/
$3
- Projects:
/api/v3/projects
- Work Packages: /api/v3/work_packages
- Time Entries: /api/v3/time_entries
- Users: /api/v3/users
- Types: /api/v3/types
- Statuses: /api/v3/statuses
- Priorities: /api/v3/priorities`- Issues: GitLab Issues
- Email: info@somit.coop
- Documentation: This README and inline code comments
This project is licensed under the MIT License - see the LICENSE file for details.