Zapier Integration
Relevant source files
The following files were used as context for generating this wiki page:
The Zapier Integration is a specialized package within the Twenty monorepo designed to facilitate seamless automation between the Twenty CRM and over 3000 external applications. It enables users to synchronize data, automate repetitive tasks, and extend the CRM's capabilities through Zapier's workflow orchestration platform.
Sources: packages/twenty-zapier/package.json:3-3
Architecture and Configuration
The integration is built using the zapier-platform-core and managed via the zapier-platform-cli. It is structured as a private package within the monorepo, utilizing modern TypeScript and Vite for its build pipeline.
Core Dependencies
The package relies on several key libraries to handle data validation, environment configuration, and utility functions:
- zapier-platform-core: The base SDK for building Zapier integrations.
- zod: Used for schema definition and runtime type validation.
- dotenv: Manages environment variables for development and deployment.
- libphonenumber-js: Provides robust parsing and validation for phone numbers.
- twenty-shared: Integrates common types and utilities from the core Twenty project.
Sources: packages/twenty-zapier/package.json:15-28
Integration Workflow
The following diagram illustrates the high-level flow of data between a user's local Twenty instance and the Zapier platform during a typical automation execution.
The diagram shows the bidirectional flow: Twenty events triggering actions in external apps, and external apps triggering actions inside Twenty via the Zapier platform.
Sources: packages/twenty-zapier/package.json:3-3, packages/twenty-shared/src/constants/DocumentationPaths.ts:168-168
Features and Capabilities
The integration supports the core CRM entities and operations provided by the Twenty platform. Users can interact with standard objects such as Companies, People, and Opportunities.
Supported Operations
The integration leverages Zapier's capabilities to perform various actions:
- Triggers: Detect new or updated records (e.g., New Person, New Opportunity).
- Actions: Create or update records in Twenty (e.g., Create Company, Update Task).
- Searches: Find specific records based on filters (e.g., Find Person by Email).
Sources: packages/twenty-shared/src/constants/DocumentationPaths.ts:168-170, packages/twenty-front/src/locales/generated/en.ts:1-1
User Experience and UI
Within the Twenty application, users can discover and manage the Zapier integration through the settings and help sections. The UI provides deep links to documentation to assist in setup.
| Feature | UI Label (Internal) | Purpose |
|---|---|---|
| Integration Link | lfQsvW | "Email integration" settings path |
| Documentation | SXCuo2 | Link to "View Docs" for integration help |
| Error Handling | W3MumH | "Cannot impersonate selected user" (Access control) |
Sources: packages/twenty-front/src/locales/generated/en.ts:1-1, packages/twenty-shared/src/constants/DocumentationPaths.ts:168-168
Developer Environment and Setup
Development of the Zapier package is integrated into the Twenty monorepo's Nx workspace. It follows specific conventions for testing and building.
Key Commands
Developers working on the twenty-zapier package use the following command structure:
- Testing: Managed via
jestwith a node-specific environment. - Building: Uses
viteto generate the final distribution files (lib/index.cjs). - Validation: Relies on
ts-jestandvite-plugin-dtsfor type safety and declaration generation.
Sources: packages/twenty-zapier/package.json:5-13, packages/twenty-zapier/package.json:23-30, CLAUDE.md:144-150
Security and Authentication
The integration must be verified against live Twenty documentation to ensure compliance with the platform's security standards, including OAuth flows and API key management. For enterprise deployments, Zapier may interact with row-level security (RLS) policies and SSO bypass configurations.
Sources: packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-design-doc/design-doc-doctrine.md:167-175, packages/twenty-front/src/locales/generated/en.ts:1-1
Conclusion
The Zapier Integration is a vital component for extending Twenty CRM's reach. By providing a bridge to the Zapier ecosystem, it empowers users to build complex, automated workflows that keep their CRM data in sync with the rest of their tech stack.