RedPlanetHQ/core

New Integration: Canva

開放

#483 建立於 2026年2月24日

 (0 則留言) (0 個反應) (1 位負責人)TypeScript (184 個分叉)auto 404
enhancementgood first issueintegrationnew-featurenew-integration

倉庫指標

星標
 (1,930 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Description

Add Canva integration to sync design assets, templates, comments, and brand content into CORE.

Reference Implementations

Existing Integrations (use as templates)

  • integrations/github/ - OAuth-based API integration
  • integrations/linear/ - Project management integration
  • integrations/slack/ - For reference

Required Files Structure

integrations/canva/
├── src/
│   ├── index.ts          # Main entry, OAuth spec
│   ├── schedule.ts       # Sync logic
│   ├── utils.ts          # Canva Connect API utilities
│   ├── account-create.ts # OAuth setup
│   └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md

Canva Connect API Integration

OAuth Setup

  • Use OAuth 2.0 Authorization Code flow
  • Register integration on the Canva Developer Portal (requires MFA-enabled account)
  • OpenAPI spec available at: https://www.canva.dev/sources/connect/api/latest/api.yml
  • Scopes: design:read, design:write, asset:read, asset:write, folder:read, folder:write, comment:read, comment:write, brandtemplate:read

Key Endpoints

  • GET /v1/designs - List user designs
  • POST /v1/designs - Create a new design
  • GET /v1/designs/{designId} - Get design details
  • GET /v1/assets - List assets in asset library
  • POST /v1/assets - Upload assets
  • GET /v1/folders - List folders
  • GET /v1/brand-templates - List brand templates
  • POST /v1/autofills - Autofill brand templates at scale
  • POST /v1/exports - Export designs
  • GET /v1/comments - Get design comments

Events to Track

  1. Designs - Design creation, modification, and exports
  2. Assets - Asset uploads, updates, and organization
  3. Comments - Design review comments and feedback
  4. Brand Templates - Template creation and autofill operations
  5. Folders - Folder organization and content changes

Implementation Tasks

  • Set up basic integration structure following integrations/github/src/index.ts pattern
  • Implement OAuth 2.0 flow in account-create.ts
  • Create API utilities in utils.ts for designs, assets, folders, and comments
  • Implement sync logic in schedule.ts for polling design and asset changes
  • Convert design/asset events to CORE activity format
  • Add error handling and rate limiting
  • Create integration documentation
  • Add to integrations/README.md

Technical Notes

  • Canva Developer Portal requires MFA-enabled account for creating integrations
  • OpenAPI spec is publicly available for client SDK generation
  • Autofill and Brand Templates APIs are currently in preview mode
  • Export API is asynchronous - need to poll for completion
  • Starter Kit available at: https://github.com/canva-sdks/canva-connect-api-starter-kit

Resources

Labels

enhancement, integration, new-feature

貢獻者指南