feat(instantly): Instantly.ai cold email integration (#19)#74
Open
jackulau wants to merge 1 commit into
Open
Conversation
) Adds a new integration with Bearer API-key credential and three nodes following the established apify/slack pattern: - instantly_add_lead — add a lead to a campaign - instantly_create_campaign — create a campaign with a drip sequence - instantly_get_analytics — fetch per-campaign metrics Nodes stay pure per CLAUDE.md: retry/timeout handled by fetchWithRetry config, no wrapper nodes, no z.any(). When the API returns a body with `success: false`, the node surfaces that as a failure instead of silently returning an empty id. Error response text is truncated to 500 chars to avoid unbounded error payloads. Schema size caps on customVariables (50 keys), emailAccounts (50), and sequence (100 steps) bound request payloads. - packages/core: register 'instantly' in NodeCredentials - packages/nodes/src/integrations/instantly: schemas, credential, 3 node files, barrel, and a 33-test suite - packages/nodes/src/integrations/index.ts + src/index.ts: wire exports Tests: 33 passing. Full suite: 224/228 (baseline 191/195; +33, 0 regressions). Typecheck: 324 pre-existing errors in transform/* unchanged by this PR. Closes wespreadjam#19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #19
Summary
Adds a new
instantlyintegration to@jam-nodes/nodeswith three operation nodes and a Bearer-token credential, following the existingapifyintegration pattern. Implements all five acceptance criteria from the issue with 33 unit tests and no regressions to the existing suite.What's in this PR:
instantly_add_lead— add a lead to a cold email campaign (POST /leads)instantly_create_campaign— create a campaign with a multi-step drip sequence (POST /campaigns)instantly_get_analytics— fetch per-campaign metrics (GET /analytics/campaigns/:id)instantlyCredential— Bearer-token credential definition viadefineBearerCredentialinstantly?: { apiKey: string }added toNodeCredentialsin@jam-nodes/coresuccess: false, fallback branches, and error-text truncationDesign notes:
packages/nodes/src/integrations/apify/as the closest template (Bearer auth, multi-operation, flat test file, sharedschemas.ts)CLAUDE.md: no retry/cache/timeout logic in node bodies — that's delegated tofetchWithRetryconfig ({ maxRetries: 3, backoffMs: 1000, timeoutMs: 30000 })z.any()oras anyanywherecustomVariables(max 50 keys),emailAccounts(max 50), andsequence(max 100 steps) to prevent unbounded payloads{ success: false, error: ... }, the node returns{ success: false, error }instead of silently surfacing the failure as successgetAnalyticsURL-encodescampaignIdviaencodeURIComponentto defend against path injectionpackages/nodes/src/integrations/index.tsandpackages/nodes/src/index.tsfollowing the Slack/Discord patternTest results:
cd packages/nodes && npx vitest run src/integrations/instantly/instantly.test.ts)@jam-nodes/nodessuite: 224/228 (baseline on main was 191/195 — this PR adds +33 passing tests and introduces zero regressions)@jam-nodes/coretypecheck: clean (cd packages/core && npm run typecheck→ exit 0)@jam-nodes/nodestypecheck: 324 errors on baseline, 324 errors with this PR — all pre-existing insrc/transform/*.tsandsrc/logic/*.ts, unchanged by this PRAcceptance Criteria