Files
twenty/packages/twenty-apps/community/mailchimp-synchronizer
Charles BochetandGitHub c0cc0689d6 Add Client Api generation (#17961)
## Add API client generation to SDK dev mode and refactor orchestrator
into step-based pipeline

### Why

The SDK dev mode lacked typed API client generation, forcing developers
to work without auto-generated GraphQL types when building applications.
Additionally, the orchestrator was a monolithic class that mixed watcher
management, token handling, and sync logic — making it difficult to
extend with new steps like client generation.

### How

- **Refactored the orchestrator** into a step-based pipeline with
dedicated classes: `CheckServer`, `EnsureValidTokens`,
`ResolveApplication`, `BuildManifest`, `UploadFiles`,
`GenerateApiClient`, `SyncApplication`, and `StartWatchers`. Each step
has typed input/output/status, managed by a new `OrchestratorState`
class.
- **Added `GenerateApiClientOrchestratorStep`** that detects
object/field schema changes and regenerates a typed GraphQL client (via
`@genql/cli`) into `node_modules/twenty-sdk/generated` for seamless
imports.
- **Replaced `checkApplicationExist`** with `findOneApplication` on both
server resolver and SDK API service, returning the entity data instead
of a boolean.
- **Added application token pair mutations**
(`generateApplicationToken`, `renewApplicationToken`) to the API
service, with the server now returning `ApplicationTokenPairDTO`
containing both access and refresh tokens.
- **Restructured the dev UI** into `dev/ui/components/` with dedicated
panel, section, and event log components.
- **Simplified `AppDevCommand`** from ~180 lines of watcher management
down to ~40 lines that delegate entirely to the orchestrator.
2026-02-17 18:45:52 +01:00
..
2025-11-21 14:10:51 +01:00

Mailchimp synchronizer

Synchronizing contacts between Twenty and Mailchimp

Requirements

  • Mailchimp API key - Mailchimp > avatar in top right corner > Profile > Extras > API keys

Setup

  1. Add app to your workspace
cd packages/twenty-apps/community/mailchimp-synchronizer
yarn auth
yarn generate
yarn sync
  1. Go to Settings > Integrations > Mailchimp synchronizer > Settings and add required variables

Flow

  • Check if required variables are set, if not, exit
  • Validate data based on set constraints, if data doesn't match constraints, exit
  • Check if person already exists in Mailchimp:
    • if yes, check if UPDATE_PERSON is set to true
      • if UPDATE_PERSON is true, check if Twenty record is the same as Mailchimp record
        • if they're the same, exit
        • if not, update
      • if UPDATE_PERSON is false, exit
    • if person doesn't exist in Mailchimp, send a request to Mailchimp with new contact

Note

  • SMS support is experimental and may cause errors
  • constraints are directly responsible for sent data so if e.g. you want to have a company name in Mailchimp, you have to set IS_COMPANY_CONSTRAINT to true