Skip to content

Apollo.io (OAuth) - Add 10 AI-optimized MCP actions#20517

Merged
dannyroosevelt merged 6 commits intomasterfrom
apollo-io-oauth-mcp-actions
Apr 6, 2026
Merged

Apollo.io (OAuth) - Add 10 AI-optimized MCP actions#20517
dannyroosevelt merged 6 commits intomasterfrom
apollo-io-oauth-mcp-actions

Conversation

@dannyroosevelt
Copy link
Copy Markdown
Collaborator

@dannyroosevelt dannyroosevelt commented Apr 5, 2026

Summary

  • Build out apollo_io_oauth from a stub into a full integration with 10 MCP-optimized actions
  • All actions have static schemas (no additionalProps/reloadProps), rich cross-referencing descriptions, and proper annotations for AI tool use
  • Read tools (6): get-current-user, list-metadata, search-contacts, search-accounts, get-opportunity, enrich-person
  • Write tools (4): create-or-update-contact, create-or-update-account, create-or-update-opportunity, add-contacts-to-sequence

Test plan

  • All actions published to personal workspace and tested via eval suite (9/10 passing)
  • ESLint passes cleanly
  • Verify OAuth scopes cover all endpoints in production

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Search and retrieve accounts and contacts with sorting, filtering, and result limits
    • Create or update accounts, contacts, and opportunities; retrieve an opportunity
    • Add contacts to email sequences; enrich person profiles via Apollo enrichment
    • List metadata (stages, sequences, email accounts, users, labels) and get current authenticated user
  • Improvements

    • Enhanced API integration with standardized requests, pagination helpers, and bulk retrieval utilities
  • Chores

    • Component package bumped to 0.1.0 and runtime dependency added

Build out the apollo_io_oauth component from a stub app file into a
full-featured integration with 10 MCP-optimized actions designed for
AI agent tool use. All actions have static schemas (no additionalProps),
rich cross-referencing descriptions, and proper annotations.

Read tools (6): get-current-user, list-metadata, search-contacts,
search-accounts, get-opportunity, enrich-person

Write tools (4): create-or-update-contact, create-or-update-account,
create-or-update-opportunity, add-contacts-to-sequence

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Apr 6, 2026 10:54pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 5, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ca2dd90b-f8ac-4aca-ad64-74340f070536

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Adds an Apollo IO OAuth integration: 10 new action modules (CRUD/search/enrich/list/add-to-sequence/get-current-user), a new app client with HTTP helpers and async pagination, supporting constants/utilities, and a package version/dependency update.

Changes

Cohort / File(s) Summary
Action modules
components/apollo_io_oauth/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs, components/apollo_io_oauth/actions/create-or-update-account/create-or-update-account.mjs, components/apollo_io_oauth/actions/create-or-update-contact/create-or-update-contact.mjs, components/apollo_io_oauth/actions/create-or-update-opportunity/create-or-update-opportunity.mjs, components/apollo_io_oauth/actions/enrich-person/enrich-person.mjs, components/apollo_io_oauth/actions/get-current-user/get-current-user.mjs, components/apollo_io_oauth/actions/get-opportunity/get-opportunity.mjs, components/apollo_io_oauth/actions/list-metadata/list-metadata.mjs, components/apollo_io_oauth/actions/search-accounts/search-accounts.mjs, components/apollo_io_oauth/actions/search-contacts/search-contacts.mjs
Added 10 action definitions. Each declares props, maps inputs to API payloads, invokes app-layer methods (search/create/update/get/list/enrich/add-to-sequence), exports $summary, and returns normalized API responses.
App implementation
components/apollo_io_oauth/apollo_io_oauth.app.mjs
Replaced prior debug method with a full API client: base URL/headers helpers, _makeRequest (Axios), HTTP verb helpers, many resource wrappers (search/create/update/get/list/addContactsToSequence/peopleEnrichment/etc.), an async generator getIterations() for pagination, and paginate() integrating with utils.
Constants & utils
components/apollo_io_oauth/common/constants.mjs, components/apollo_io_oauth/common/utils.mjs
Added constants (BASE_URL, VERSION_PATH, DEFAULT_LIMIT, DEFAULT_MAX) and utils.iterate() to consume async iterables into arrays.
Package manifest
components/apollo_io_oauth/package.json
Bumped package version to 0.1.0 and added dependency @pipedream/platform: ^3.1.1.

Sequence Diagram

sequenceDiagram
    participant Action as Action (run)
    participant App as apollo_io_oauth.app
    participant Iterator as getIterations()
    participant API as Apollo API
    participant Utils as utils.iterate

    Action->>App: call resource method / paginate
    App->>Iterator: getIterations(resourceFn, resourceFnArgs, resourceName, max)
    Iterator->>API: resourceFn(params: page, per_page, ...)
    API-->>Iterator: response { items..., page_info }
    Iterator->>Iterator: yield items[]
    loop pages
        Iterator->>API: resourceFn(next page)
        API-->>Iterator: response...
        Iterator->>Iterator: yield items[]
    end
    Iterator-->>App: async iterable of items
    App->>Utils: utils.iterate(iterable)
    Utils-->>App: aggregated array
    App-->>Action: return array, export $summary
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • michelle0927
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed Title accurately summarizes the main change: adding 10 AI-optimized MCP actions to Apollo.io OAuth integration.
Description check ✅ Passed Description provides comprehensive details including action breakdown (6 read/4 write), test status, and implementation approach, though the required 'WHY' section from template is not explicitly filled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch apollo-io-oauth-mcp-actions

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
components/apollo_io_oauth/package.json (2)

18-18: ⚠️ Potential issue | 🟡 Minor

Add trailing newline at EOF

Lint failure indicates missing newline at end of file. Please add one after the closing }.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/apollo_io_oauth/package.json` at line 18, The package.json file is
missing a trailing newline after the final closing brace; update
components/apollo_io_oauth/package.json by adding a single newline character at
EOF (after the final "}" ) so the file ends with a newline to satisfy the
linter.

3-3: ⚠️ Potential issue | 🟠 Major

Bump component version to pass component checks

components/apollo_io_oauth/package.json changed, but Line 3 still has "version": "0.0.1". CI requires incrementing component version for modified components.

Suggested patch
-  "version": "0.0.1",
+  "version": "0.0.2",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/apollo_io_oauth/package.json` at line 3, The package.json version
for the modified component still reads "version": "0.0.1" causing CI to fail;
update the "version" field in components/apollo_io_oauth/package.json (the JSON
key "version") to a new incremented semver (e.g., 0.0.2 or appropriate next
patch/minor) so the component change passes checks and commit the bump with the
PR.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@components/apollo_io_oauth/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs`:
- Around line 76-96: The summary generation assumes contacts exists and accesses
contacts.length, which can throw if the response shape is unexpected; update the
handling after this.app.addContactsToSequence in add-contacts-to-sequence.mjs so
you default contacts to an empty array (or use optional chaining) before
computing the message and call to $.export (i.e., derive a safeContacts =
contacts || [] or safeContacts = contacts ?? [] and use safeContacts.length in
the summary string), ensuring the message still pluralizes correctly.

In
`@components/apollo_io_oauth/actions/create-or-update-account/create-or-update-account.mjs`:
- Around line 57-87: The run method lacks input validation: before calling
app.createAccount ensure required create fields (at minimum this.name) are
present and throw or return a clear error via $ (e.g., throw new Error or
$.export error) if missing; before calling app.updateAccount ensure that when
this.accountId is set at least one updatable field (this.name, this.domain, or
this.phone) is provided and otherwise short-circuit with a clear error message;
add these checks at the top of run (referencing run, this.accountId, this.name,
this.domain, this.phone) and only call app.createAccount or app.updateAccount
when the respective preconditions are satisfied, keeping the existing $.export
summary behavior for success.

In
`@components/apollo_io_oauth/actions/create-or-update-opportunity/create-or-update-opportunity.mjs`:
- Around line 37-87: The action allows all fields optional but still performs
creates/updates; add deterministic precondition checks in the
create-or-update-opportunity handler (the run() function) to validate input:
when operation is "create" require at least name, accountId, opportunityStageId,
and closedDate (and optionally ownerId/amount) and return a clear validation
error if any are missing; when operation is "update" require that at least one
of the updatable fields (name, ownerId, amount, opportunityStageId, closedDate,
accountId) is present and return a validation error if none are provided;
implement these checks early in run() before calling the API and use consistent
error messages for each missing/invalid field.

In `@components/apollo_io_oauth/actions/enrich-person/enrich-person.mjs`:
- Around line 96-131: Add a guard inside the async run() before calling
this.app.peopleEnrichment: if revealPhoneNumber is true, validate that
webhookUrl is present and a non-empty string (and optionally valid URL format)
and fail fast (throw an error or return a clear failure) when it's
missing/invalid; reference the revealPhoneNumber and webhookUrl properties and
perform the check in run() so peopleEnrichment() is only called when the
required webhookUrl is provided.

In `@components/apollo_io_oauth/actions/list-metadata/list-metadata.mjs`:
- Around line 25-44: The schema for the list-metadata action is missing the
"labels" option and the handler doesn't dispatch listLabels(), so callers (e.g.,
create-or-update-contact) cannot discover labels; update the metadataType
definition to include "labels" in the options array and extend its description
to mention label discovery, and then modify the action handler in
list-metadata.mjs to recognize metadataType === "labels" and call the existing
listLabels() function (and return/transform its result consistently with the
other branches).

In `@components/apollo_io_oauth/actions/search-accounts/search-accounts.mjs`:
- Around line 7-17: The action description promises filtering by the current
user's owner ID but the action implementation (search-accounts.mjs, specifically
the run() handler) does not accept or forward any owner filter; either remove
that claim from the description or implement the filter: add a new input (e.g.,
ownerId or myAccounts flag) to the action's schema, fetch the current user owner
ID when myAccounts is true (via Get Current User or receiving it as ownerId),
and include it in the API request/params sent by run() so the Apollo search call
filters by owner; update any related helper functions or parameter mapping in
run() to pass the owner filter through.

In `@components/apollo_io_oauth/actions/search-contacts/search-contacts.mjs`:
- Around line 67-89: The code treats 0 as unset by using `this.maxResults ||
undefined`; update the `run` logic to use nullish coalescing and explicit bounds
checking: replace `this.maxResults || undefined` with `this.maxResults ??
undefined` and before calling `this.app.getIterations` validate/clamp
`this.maxResults` (from the `run` scope) to an integer within allowed bounds
(e.g., 0..600) or set it to `undefined` if null/undefined; reference
`maxResults`, `run`, and `this.maxResults` when making the change so the `max`
param passed to `this.app.getIterations` correctly allows 0 and enforces the max
limit.

In `@components/apollo_io_oauth/apollo_io_oauth.app.mjs`:
- Around line 68-88: Both updateContact and updateAccount are using this.put
which sends HTTP PUT but the Apollo API requires PATCH; change updateContact({
contactId, ...args }) and updateAccount({ accountId, ...args }) to call
this.patch instead of this.put so they send PATCH to `/contacts/${contactId}`
and `/accounts/${accountId}` respectively, preserving the existing args
spreading and behavior used by updateOpportunity (which already uses PATCH) as a
model.

---

Outside diff comments:
In `@components/apollo_io_oauth/package.json`:
- Line 18: The package.json file is missing a trailing newline after the final
closing brace; update components/apollo_io_oauth/package.json by adding a single
newline character at EOF (after the final "}" ) so the file ends with a newline
to satisfy the linter.
- Line 3: The package.json version for the modified component still reads
"version": "0.0.1" causing CI to fail; update the "version" field in
components/apollo_io_oauth/package.json (the JSON key "version") to a new
incremented semver (e.g., 0.0.2 or appropriate next patch/minor) so the
component change passes checks and commit the bump with the PR.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 691de513-ad59-4247-9af0-944ac3666f5f

📥 Commits

Reviewing files that changed from the base of the PR and between 7cc9d62 and d9caf73.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (14)
  • components/apollo_io_oauth/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs
  • components/apollo_io_oauth/actions/create-or-update-account/create-or-update-account.mjs
  • components/apollo_io_oauth/actions/create-or-update-contact/create-or-update-contact.mjs
  • components/apollo_io_oauth/actions/create-or-update-opportunity/create-or-update-opportunity.mjs
  • components/apollo_io_oauth/actions/enrich-person/enrich-person.mjs
  • components/apollo_io_oauth/actions/get-current-user/get-current-user.mjs
  • components/apollo_io_oauth/actions/get-opportunity/get-opportunity.mjs
  • components/apollo_io_oauth/actions/list-metadata/list-metadata.mjs
  • components/apollo_io_oauth/actions/search-accounts/search-accounts.mjs
  • components/apollo_io_oauth/actions/search-contacts/search-contacts.mjs
  • components/apollo_io_oauth/apollo_io_oauth.app.mjs
  • components/apollo_io_oauth/common/constants.mjs
  • components/apollo_io_oauth/common/utils.mjs
  • components/apollo_io_oauth/package.json

Comment thread components/apollo_io_oauth/actions/enrich-person/enrich-person.mjs
Comment thread components/apollo_io_oauth/actions/list-metadata/list-metadata.mjs
Comment thread components/apollo_io_oauth/apollo_io_oauth.app.mjs
Comment thread components/apollo_io_oauth/actions/list-metadata/list-metadata.mjs
Comment thread components/apollo_io_oauth/apollo_io_oauth.app.mjs
@GTFalcao GTFalcao moved this from Ready for PR Review to Changes Required in Component (Source and Action) Backlog Apr 6, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
components/apollo_io_oauth/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs (1)

76-99: ⚠️ Potential issue | 🟡 Minor

Default contacts to an array to keep summary and return value stable

Using contacts?.length prevents a crash, but still allows "Added undefined contacts to sequence" and return contacts may return undefined. Normalize response shape before summary/return.

Suggested patch
-    const { contacts } = await this.app.addContactsToSequence({
+    const response = await this.app.addContactsToSequence({
       $,
       sequenceId: this.sequenceId,
       data: {
         contact_ids: this.contactIds,
         emailer_campaign_id: this.sequenceId,
@@
         sequence_finished_in_other_campaigns:
           this.sequenceFinishedInOtherCampaigns,
       },
     });
+    const contacts = Array.isArray(response?.contacts)
+      ? response.contacts
+      : [];
 
     $.export(
       "$summary",
-      `Added ${contacts?.length} contact${contacts?.length === 1
+      `Added ${contacts.length} contact${contacts.length === 1
         ? ""
         : "s"} to sequence`,
     );
 
     return contacts;

Based on learnings, summary messages exported in run should be correctly formatted and deterministic.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@components/apollo_io_oauth/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs`
around lines 76 - 99, The response `contacts` from
this.app.addContactsToSequence may be undefined causing non-deterministic
summary and return; normalize it to an array immediately after the call (e.g.,
use a default in the destructure or set const normalizedContacts = contacts ??
[]) and then use normalizedContacts for the $.export summary
(`normalizedContacts.length`) and as the return value so the summary and return
are always stable and an array; update references to `contacts` in this block
(the result of this.app.addContactsToSequence) to the normalized variable.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@components/apollo_io_oauth/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs`:
- Around line 35-41: The action's contactIds input is documented as "one or
more" but there's no local validation; add a pre-call guard in the
add-contacts-to-sequence handler to check that contactIds exists and
contactIds.length > 0 and fail fast with a clear error (e.g., throw or return an
error like "contactIds must be a non-empty array") before making the Apollo/API
call (the block that enqueues/enrolls contacts around the existing contactIds
usage, referenced by contactIds and the API call in the add-contacts-to-sequence
action); apply the same check where contactIds is consumed in the later call
site (the second occurrence around lines 75-89) so the action never calls Apollo
with an empty array.

---

Duplicate comments:
In
`@components/apollo_io_oauth/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs`:
- Around line 76-99: The response `contacts` from this.app.addContactsToSequence
may be undefined causing non-deterministic summary and return; normalize it to
an array immediately after the call (e.g., use a default in the destructure or
set const normalizedContacts = contacts ?? []) and then use normalizedContacts
for the $.export summary (`normalizedContacts.length`) and as the return value
so the summary and return are always stable and an array; update references to
`contacts` in this block (the result of this.app.addContactsToSequence) to the
normalized variable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1ad636d2-06f0-47ab-9163-a2a51d361ae3

📥 Commits

Reviewing files that changed from the base of the PR and between f9a4b4d and 8dcf036.

📒 Files selected for processing (1)
  • components/apollo_io_oauth/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs

dannyroosevelt and others added 2 commits April 6, 2026 13:49
- Fix updateContact/updateAccount to use PATCH instead of PUT per API docs
- Add missing `labels` option to list-metadata action
- Remove unsupported owner filter claims from search descriptions
- Guard against undefined contacts in add-contacts-to-sequence
- Use nullish coalescing (??) for maxResults in search actions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@components/apollo_io_oauth/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs`:
- Around line 75-89: Before calling this.app.addContactsToSequence inside the
async run method, add a guard that validates this.contactIds is a non-empty
array (or contains at least one ID); if it's missing or has length === 0, abort
early and surface a clear error (e.g., throw an Error or return a failed action)
that mentions "contactIds must contain one or more contact IDs". Modify the run
function's pre-call logic to perform the check and avoid invoking
addContactsToSequence when contactIds is empty.

In `@components/apollo_io_oauth/actions/search-accounts/search-accounts.mjs`:
- Around line 60-67: The description for the maxResults input is misleading: it
says "Defaults to 100" but the actual default is DEFAULT_MAX (600). Update the
maxResults description string (the maxResults input) to reflect the true default
(600) or reference DEFAULT_MAX instead of 100 so the text matches the code
(e.g., "Defaults to 600. Max 600."). Ensure the change is made where maxResults
is defined so the label/description aligns with DEFAULT_MAX.

In `@components/apollo_io_oauth/actions/search-contacts/search-contacts.mjs`:
- Around line 65-72: The description for the maxResults input is misleading (it
says "Defaults to 100" while getIterations uses DEFAULT_MAX which is 600);
update the description of maxResults to accurately state the actual default
(e.g., "Defaults to 600 (DEFAULT_MAX)") or reference DEFAULT_MAX so users know
the real default, and ensure the symbolic name DEFAULT_MAX, the maxResults
field, and the getIterations logic remain consistent after the change.

In `@components/apollo_io_oauth/apollo_io_oauth.app.mjs`:
- Around line 38-43: Remove the dead helper method put() by deleting the entire
function block that calls this._makeRequest({ method: "put", ...args }) since
all update operations use patch(); also search for any remaining references to
put() in the component and delete or replace them with patch() if found to
ensure no callers are left dangling (target symbols: put(), patch(),
_makeRequest).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 10c6cc73-2fe0-4a6d-8665-400062835ae7

📥 Commits

Reviewing files that changed from the base of the PR and between 8dcf036 and dfa4d59.

📒 Files selected for processing (5)
  • components/apollo_io_oauth/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs
  • components/apollo_io_oauth/actions/list-metadata/list-metadata.mjs
  • components/apollo_io_oauth/actions/search-accounts/search-accounts.mjs
  • components/apollo_io_oauth/actions/search-contacts/search-contacts.mjs
  • components/apollo_io_oauth/apollo_io_oauth.app.mjs

Comment on lines +75 to +89
async run({ $ }) {
const response = await this.app.addContactsToSequence({
$,
sequenceId: this.sequenceId,
data: {
contact_ids: this.contactIds,
emailer_campaign_id: this.sequenceId,
send_email_from_email_account_id: this.emailAccountId,
sequence_no_email: this.sequenceNoEmail,
sequence_active_in_other_campaigns:
this.sequenceActiveInOtherCampaigns,
sequence_finished_in_other_campaigns:
this.sequenceFinishedInOtherCampaigns,
},
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider validating non-empty contactIds before API call.

The description states "One or more contact IDs" but there's no guard against an empty array. While the API may reject it, a local check provides clearer error messaging and faster feedback.

🛡️ Suggested validation
   async run({ $ }) {
+    if (!this.contactIds?.length) {
+      throw new Error("At least one contact ID is required.");
+    }
+
     const response = await this.app.addContactsToSequence({
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@components/apollo_io_oauth/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs`
around lines 75 - 89, Before calling this.app.addContactsToSequence inside the
async run method, add a guard that validates this.contactIds is a non-empty
array (or contains at least one ID); if it's missing or has length === 0, abort
early and surface a clear error (e.g., throw an Error or return a failed action)
that mentions "contactIds must contain one or more contact IDs". Modify the run
function's pre-call logic to perform the check and avoid invoking
addContactsToSequence when contactIds is empty.

Comment on lines +60 to +67
maxResults: {
type: "integer",
label: "Max Results",
description:
"Maximum number of accounts to return. Defaults to 100."
+ " Max 600.",
optional: true,
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix misleading default value in description.

Same issue as search-contacts: the description states "Defaults to 100" but the actual default is 600 (DEFAULT_MAX).

📝 Suggested fix
     maxResults: {
       type: "integer",
       label: "Max Results",
       description:
-        "Maximum number of accounts to return. Defaults to 100."
+        "Maximum number of accounts to return. Defaults to 600."
         + " Max 600.",
       optional: true,
     },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
maxResults: {
type: "integer",
label: "Max Results",
description:
"Maximum number of accounts to return. Defaults to 100."
+ " Max 600.",
optional: true,
},
maxResults: {
type: "integer",
label: "Max Results",
description:
"Maximum number of accounts to return. Defaults to 600."
" Max 600.",
optional: true,
},
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/apollo_io_oauth/actions/search-accounts/search-accounts.mjs`
around lines 60 - 67, The description for the maxResults input is misleading: it
says "Defaults to 100" but the actual default is DEFAULT_MAX (600). Update the
maxResults description string (the maxResults input) to reflect the true default
(600) or reference DEFAULT_MAX instead of 100 so the text matches the code
(e.g., "Defaults to 600. Max 600."). Ensure the change is made where maxResults
is defined so the label/description aligns with DEFAULT_MAX.

Comment on lines +65 to +72
maxResults: {
type: "integer",
label: "Max Results",
description:
"Maximum number of contacts to return. Defaults to 100."
+ " Max 600.",
optional: true,
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix misleading default value in description.

The description states "Defaults to 100" but when maxResults is unset, getIterations uses DEFAULT_MAX (600) as the default. This could cause users to receive more results than expected.

📝 Suggested fix
     maxResults: {
       type: "integer",
       label: "Max Results",
       description:
-        "Maximum number of contacts to return. Defaults to 100."
+        "Maximum number of contacts to return. Defaults to 600."
         + " Max 600.",
       optional: true,
     },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
maxResults: {
type: "integer",
label: "Max Results",
description:
"Maximum number of contacts to return. Defaults to 100."
+ " Max 600.",
optional: true,
},
maxResults: {
type: "integer",
label: "Max Results",
description:
"Maximum number of contacts to return. Defaults to 600."
" Max 600.",
optional: true,
},
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/apollo_io_oauth/actions/search-contacts/search-contacts.mjs`
around lines 65 - 72, The description for the maxResults input is misleading (it
says "Defaults to 100" while getIterations uses DEFAULT_MAX which is 600);
update the description of maxResults to accurately state the actual default
(e.g., "Defaults to 600 (DEFAULT_MAX)") or reference DEFAULT_MAX so users know
the real default, and ensure the symbolic name DEFAULT_MAX, the maxResults
field, and the getIterations logic remain consistent after the change.

Comment on lines +38 to +43
put(args = {}) {
return this._makeRequest({
method: "put",
...args,
});
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if put() is used anywhere in the apollo_io_oauth component
rg -n '\bthis\.put\b|\bapp\.put\b' components/apollo_io_oauth/

Repository: PipedreamHQ/pipedream

Length of output: 47


🏁 Script executed:

# Search entire repository for any usage of put() method in context of apollo_io_oauth
rg -n 'put\(' . --type mjs --type js | grep -i apollo

Repository: PipedreamHQ/pipedream

Length of output: 92


🏁 Script executed:

# Also search for 'put' in more patterns including property access
rg -n '\.put\s*\(' . --type mjs --type js | head -20

Repository: PipedreamHQ/pipedream

Length of output: 92


🏁 Script executed:

# View the apollo_io_oauth.app.mjs file to see the current state
cat -n components/apollo_io_oauth/apollo_io_oauth.app.mjs | head -50

Repository: PipedreamHQ/pipedream

Length of output: 1551


🏁 Script executed:

# Search entire repository for put( usage without file type restrictions
rg -n '\.put\s*\(' .

Repository: PipedreamHQ/pipedream

Length of output: 5085


🏁 Script executed:

# Check if updateContact and updateAccount use patch()
sed -n '50,150p' components/apollo_io_oauth/apollo_io_oauth.app.mjs | cat -n

Repository: PipedreamHQ/pipedream

Length of output: 2931


🏁 Script executed:

# Check if put() is referenced in any test files or documentation
rg -n 'apollo_io_oauth.*put|put.*apollo' . --type-list | head -20

Repository: PipedreamHQ/pipedream

Length of output: 454


🏁 Script executed:

# Check if there are other files in apollo_io_oauth component that might use put()
find components/apollo_io_oauth/ -type f -name '*.mjs' -o -name '*.js' | head -20

Repository: PipedreamHQ/pipedream

Length of output: 991


🏁 Script executed:

# Search specifically for any usage of put in the entire apollo_io_oauth directory
rg -n 'put' components/apollo_io_oauth/

Repository: PipedreamHQ/pipedream

Length of output: 216


🏁 Script executed:

# Verify the apollo_io vs apollo_io_oauth distinction - check if they're different components
ls -la components/apollo_io* 2>/dev/null | head -20

Repository: PipedreamHQ/pipedream

Length of output: 1001


🏁 Script executed:

# Search all action files in apollo_io_oauth for any use of put()
rg -n '\.put\(' components/apollo_io_oauth/actions/

Repository: PipedreamHQ/pipedream

Length of output: 47


Remove the unused put() helper method.

The put() method (lines 38–43) is not used anywhere in the apollo_io_oauth component. All update operations use patch() instead. Removing this dead code reduces maintenance burden.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/apollo_io_oauth/apollo_io_oauth.app.mjs` around lines 38 - 43,
Remove the dead helper method put() by deleting the entire function block that
calls this._makeRequest({ method: "put", ...args }) since all update operations
use patch(); also search for any remaining references to put() in the component
and delete or replace them with patch() if found to ensure no callers are left
dangling (target symbols: put(), patch(), _makeRequest).

@dannyroosevelt dannyroosevelt merged commit decc70f into master Apr 6, 2026
8 checks passed
@dannyroosevelt dannyroosevelt deleted the apollo-io-oauth-mcp-actions branch April 6, 2026 22:56
@github-project-automation github-project-automation Bot moved this from Changes Required to Done in Component (Source and Action) Backlog Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants