A TypeScript CLI tool for importing Project Online data to Smartsheet. This tool helps organizations migrate their Microsoft Project Online projects to Smartsheet workspaces while preserving project structure, tasks, resources, and relationships.
npm install -g @smartsheet/project-online-importnpm install -g git+https://github.com/smartsheet-platform/project-online-import.gitgit clone https://github.com/smartsheet-platform/project-online-import.git
cd project-online-import
npm install
npm run build
npm link # Makes CLI globally available- Node.js >= 18.0.0
- npm >= 9.0.0
- Access to both Microsoft Project Online and Smartsheet
-
Clone the repository:
git clone https://github.com/smartsheet-platform/project-online-import.git cd project-online-import -
Install dependencies:
npm install
-
Build the project:
npm run build
npm run dev- Run the CLI in development mode with ts-nodenpm run build- Compile TypeScript to JavaScriptnpm start- Run the compiled CLInpm test- Run unit testsnpm run test:watch- Run tests in watch modenpm run test:coverage- Run tests with coverage reportnpm run lint- Check code for linting errorsnpm run lint:fix- Fix linting errors automaticallynpm run format- Format code with Prettiernpm run format:check- Check code formattingnpm run typecheck- Run TypeScript type checkingnpm run clean- Remove build artifacts
Import data from Project Online to Smartsheet:
npm run dev -- import --source <project-id> --destination <workspace-id># Import a specific project
npm run dev -- import --source 12345678-1234-1234-1234-123456789abc --destination 987654321
# Dry run for a specific project
npm run dev -- import --source 12345678-1234-1234-1234-123456789abc --destination 987654321 --dry-run-s, --source <project-id>- Project Online project ID (GUID) to import-d, --destination <workspace-id>- Smartsheet destination workspace ID--dry-run- Run without making changes (validation only)-v, --verbose- Enable verbose logging--config <path>- Path to custom .env configuration file
Import all accessible Project Online projects (each gets its own workspace):
# Import all accessible projects (creates one workspace per project)
npm run dev -- bulk-import
# Dry run to discover what projects would be imported
npm run dev -- bulk-import --dry-run
# Verbose output
npm run dev -- bulk-import --verbose--dry-run- Discover projects without making changes-v, --verbose- Enable verbose logging--config <path>- Path to custom .env configuration file
Output: After successful completion, displays a mapping of project names to workspace links:
π Project β Workspace Links:
Project Alpha β https://app.smartsheet.com/b/workspace/123456789
Project Beta β https://app.smartsheet.com/b/workspace/987654321
Validate Project Online data before import:
npm run dev -- validate --source <project-id>Example:
npm run dev -- validate --source 12345678-1234-1234-1234-123456789abcValidate and display current configuration:
npm run dev -- configFor automation and CI/CD pipelines, use the standalone bulk import script:
# Bulk import all projects (automation-friendly)
npx tsx scripts/bulk-import-all-projects.ts
# Dry run for automation testing
npx tsx scripts/bulk-import-all-projects.ts --dry-runRun all tests:
npm testRun tests with coverage:
npm run test:coverageRun tests in watch mode:
npm run test:watchThis project uses:
- TypeScript for type safety
- ESLint for code linting
- Prettier for code formatting
- Jest for unit testing
Run all quality checks:
npm run typecheck
npm run lint
npm run format:check
npm testThe tool supports multiple workspace creation strategies via the SOLUTION_TYPE configuration:
# In your .env file
SOLUTION_TYPE=StandaloneWorkspaces # Default - creates independent workspaces
# SOLUTION_TYPE=Portfolio # Future - creates portfolio-based workspacesStandaloneWorkspaces (default):
- Creates independent PMO Standards workspace
- Creates individual project workspaces
- Current tested implementation
Portfolio (future):
- Creates workspaces within portfolio structure
- Not yet implemented - coming soon!
See Factory Pattern Design for technical details.
See .env.sample for all available configuration options including:
SMARTSHEET_API_TOKEN- Smartsheet API authenticationPMO_STANDARDS_WORKSPACE_ID- Reuse existing PMO Standards workspaceTEMPLATE_WORKSPACE_ID- Use template for project workspace creation- Project Online authentication settings
Documentation is organized into three sections based on your needs:
Start here if you're migrating from Project Online to Smartsheet
For: Project managers, administrators, end users
- Migration Overview β START HERE - Business context, what the tool does, migration structure
- Authentication Setup - Credential configuration
- CLI Usage Guide - Complete command reference and examples
- Troubleshooting - Common issues and solutions
ποΈ How it Works
Start here to understand the technical architecture and design
For: Technical leads, architects, evaluators
- ETL System Design β START HERE - Component architecture and implementation
- Data Transformation Guide - Data mappings and transformation specs
- Factory Pattern Design - Workspace creation strategies
- Template-Based Workspace Creation - Efficient workspace creation
- Re-run Resiliency - Idempotent operations and multi-run support
- Sheet References - Cross-sheet references and relationships
π οΈ Contributing
Start here if you're developing or extending the codebase
For: Developers, contributors, maintainers
- Issue First Approach β START HERE - How to write effective issues for AI agents
- Code Conventions - Naming, formatting, and style standards
- Code Patterns - Recommended implementation patterns
- Anti-Patterns - Common mistakes to avoid
- API Services Catalog - External API integration reference
- Test Suite Guide - Testing strategy and implementation
- Each document has Previous/Next links for sequential reading
- Each document has section badges showing which section you're in
- Quick Access: Jump directly to any section's starting point above
.
βββ sdlc/ # SDLC documentation and configuration
β βββ docs/
β β βββ architecture/ # System architecture documentation
β β β βββ Project-Online-Migration-Overview.md
β β β βββ ETL-System-Design.md
β β β βββ Data-Transformation-Guide.md
β β β βββ claude-agent-system.md
β β β βββ ultra-dry-architecture.md
β β βββ project/ # Implementation guides
β β β βββ Authentication-Setup.md
β β β βββ CLI-Usage-Guide.md
β β β βββ Re-run-Resiliency.md
β β β βββ Sheet-References.md
β β β βββ Template-Based-Workspace-Creation.md
β β βββ code/ # Code standards and patterns
β β β βββ Anti-Patterns.md
β β β βββ Conventions.md
β β β βββ Patterns.md
β β β βββ Troubleshooting-Playbook.md
β β βββ api-reference/ # API integration reference
β β β βββ API-Services-Catalog.md
β β βββ specs/ # Technical specifications
β β βββ E2E-Integration-Tests.md
β β βββ Project-Plan.md
β βββ shared/ # Shared documentation for Roo/Claude
β βββ memory-bank/ # SDLC context and progress tracking
βββ src/ # Source code
β βββ cli.ts # CLI entry point
β βββ index.ts # Main export file
β βββ factories/ # Workspace creation strategies
β β βββ index.ts # Factory exports
β β βββ WorkspaceFactory.ts # Factory interface
β β βββ WorkspaceFactoryProvider.ts # Factory selector
β β βββ StandaloneWorkspacesFactory.ts # Default implementation
β β βββ PortfolioFactory.ts # Future portfolio implementation
β βββ lib/ # Core library code
β β βββ importer.ts # ETL orchestration
β β βββ ProjectOnlineClient.ts # Project Online API client
β β βββ auth/
β β βββ MSALAuthHandler.ts # Microsoft authentication
β βββ transformers/ # Data transformation layer
β β βββ AssignmentTransformer.ts
β β βββ PMOStandardsTransformer.ts
β β βββ ProjectTransformer.ts
β β βββ ResourceTransformer.ts
β β βββ TaskTransformer.ts
β β βββ utils.ts
β βββ types/ # TypeScript type definitions
β β βββ ProjectOnline.ts
β β βββ Smartsheet.ts
β β βββ SmartsheetClient.ts
β βββ util/ # Utility classes
β βββ ConfigManager.ts
β βββ ErrorHandler.ts
β βββ ExponentialBackoff.ts
β βββ Logger.ts
β βββ ProgressReporter.ts
β βββ SmartsheetHelpers.ts
βββ test/ # Test suite
β βββ unit/ # Unit tests with mocks
β β βββ builders/ # Test data builders
β β βββ transformers/ # Transformer unit tests
β β βββ MockODataClient.ts
β β βββ MockSmartsheetClient.ts
β βββ integration/ # Integration tests
β β βββ scenarios/ # Test scenario definitions
β β βββ helpers/ # Test utilities
β βββ README.md # Test suite documentation
βββ memory-bank/ # Main app project context
βββ scripts/ # Utility scripts
βββ dist/ # Compiled output (generated)
βββ coverage/ # Test coverage reports (generated)
βββ node_modules/ # Dependencies (generated)
This tool implements an Extract-Transform-Load (ETL) pattern:
- Extract - Fetch data from Project Online oData API (future)
- Transform - Convert Project Online entities to Smartsheet format
- Load - Create Smartsheet workspaces, sheets, and populate data
- Workspace per Project - Each Project Online project becomes a dedicated Smartsheet workspace
- Three Sheets per Project - Summary, Tasks, and Resources
- Hierarchical Tasks - Maintains task hierarchy from Project Online
- Resource Type Handling - Work resources use contact lists, Material/Cost use picklists
- PMO Standards - Centralized reference sheets for consistent picklist values
- Factory Pattern - Extensible workspace creation supporting multiple strategies
- Type Safety - Full TypeScript implementation with comprehensive type definitions
See Project Online Migration Overview and ETL System Design for complete details.
This project follows an "Issue First" approach for all contributions. Before making code changes:
- Create or find a GitHub Issue describing the change
- Provide clear context and examples in the issue
- Reference relevant documentation and APIs
This approach enables effective collaboration with AI coding agents (Claude Code and Roo Code) and ensures high-quality contributions. See the Issue First Approach Guide for detailed guidance.
Please ensure all contributions meet these standards:
- All code passes
npm run typecheck,npm run lint, andnpm test - New features include appropriate unit and integration tests
- Code follows the conventions in Code Conventions and Patterns
- Documentation is updated for significant changes
MIT