Add People Data Labs enrichment logic functions#21254
Conversation
|
👋 Thanks for contributing to Twenty! Your PR has been set to draft while you work on it. Once you're done, mark it as Ready for review and our automated checks will run. Looking forward to your contribution! |
There was a problem hiding this comment.
3 issues found across 139 files
Note: This PR contains a large number of files. cubic only reviews up to 100 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.
Re-trigger cubic
🔍 Automated Pre-ReviewAutomated pre-review — human approval still required. |
…-labs-enrichment-mapper
…entyhq/twenty into r--people-data-labs-enrichment-mapper
There was a problem hiding this comment.
2 issues found
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/twenty-apps/internal/people-data-labs/src/logic-functions/enrich-person.function.ts">
<violation number="1" location="packages/twenty-apps/internal/people-data-labs/src/logic-functions/enrich-person.function.ts:22">
P2: `records` schema is narrower than the actual bulk input contract, so valid string-id batches can be rejected before enrichment runs.</violation>
</file>
Note: This PR contains a large number of files. cubic only reviews up to 100 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 5 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
…entyhq/twenty into r--people-data-labs-enrichment-mapper
Add People Data Labs enrichment logic functions
Implements the enrichment logic functions that call the PDL API and map responses onto standard +
pdl*fields.enrich-person/enrich-company) and single-record AI tools. Each guards a TTL, matches via identifier, fills standard fields only when empty, always writespdl*fields, and normalizes SELECT values against field options.companyrelation (find-or-create, fill-only-if-empty); removed the dedicatedpdlCurrentCompanyrelation, sixpdlJobCompany*scalars, and thepdl*indexes.Not functional yet: the post-install workflow seeding (
seed-enrichment-workflow.ts) is left in place but blocked — it needs workflow-builder mutations that the CRUD-only app SDK schema doesn't expose.Deferred: metering/billing and auto-enrichment triggers.
CleanShot.2026-06-10.at.18.33.48.mp4
CleanShot.2026-06-10.at.18.53.44.mp4