Skip to content

[ACTION] Clevertap new campaign components #17564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 18, 2025
Merged

Conversation

jcortes
Copy link
Collaborator

@jcortes jcortes commented Jul 9, 2025

WHY

Resolves #17282

Summary by CodeRabbit

  • New Features

    • Added actions to create, stop, and retrieve reports for CleverTap campaigns.
    • Introduced an action to list campaigns within a specified date range.
    • Enhanced input handling with support for targeting, scheduling, and content options when creating campaigns.
  • Improvements

    • Improved campaign selection with dynamic campaign ID options.
    • Added robust JSON parsing for input fields.
    • Added new campaign-related methods to the CleverTap app integration.
  • Updates

    • Updated package and dependency versions.
    • Minor version bumps for existing actions.

@jcortes jcortes self-assigned this Jul 9, 2025
Copy link
Contributor

coderabbitai bot commented Jul 9, 2025

Walkthrough

This update introduces full integration with the CleverTap Campaign API, adding new actions for creating, stopping, listing, and reporting on campaigns. Supporting methods are implemented in the CleverTap app module, and a utility for safe recursive JSON parsing is included. Minor version bumps and dependency updates are also present.

Changes

Files/Paths Change Summary
components/clevertap/actions/create-campaign/create-campaign.mjs Added new "Create Campaign" action for campaign creation via CleverTap API.
components/clevertap/actions/get-campaign-report/get-campaign-report.mjs Added new "Get Campaign Report" action to fetch campaign report by ID.
components/clevertap/actions/get-campaigns/get-campaigns.mjs Added new "Get Campaigns" action to list campaigns within a date range.
components/clevertap/actions/stop-campaign/stop-campaign.mjs Added new "Stop Campaign" action to stop a running campaign by ID.
components/clevertap/clevertap.app.mjs Added campaign-related methods and propDefinitions; refactored internal request handling to synchronous with explicit JSON header.
components/clevertap/common/utils.mjs Introduced new parseJson utility for recursive JSON parsing with cycle detection.
components/clevertap/actions/create-or-update-user/create-or-update-user.mjs
components/clevertap/actions/upload-events/upload-events.mjs
Updated version numbers for existing actions.
components/clevertap/package.json Bumped package version to 0.2.0 and updated platform dependency.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ActionModule
    participant CleverTapApp
    participant CleverTapAPI

    User->>ActionModule: Initiate campaign action (create/stop/get/report)
    ActionModule->>CleverTapApp: Call corresponding method (e.g., createCampaign)
    CleverTapApp->>CleverTapAPI: Make HTTP request to campaign endpoint
    CleverTapAPI-->>CleverTapApp: Return API response
    CleverTapApp-->>ActionModule: Return processed response
    ActionModule-->>User: Output result/summary
Loading

Poem

A CleverTap hop, a campaign to send,
With actions and reports, our work doesn’t end.
Stop or create, fetch lists with delight,
JSONs parsed safely, all logic airtight.
Version bumped up, dependencies too—
This rabbit’s campaign magic, delivered to you!
🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/clevertap/actions/get-campaigns/get-campaigns.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:202:49)

components/clevertap/actions/stop-campaign/stop-campaign.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:202:49)

components/clevertap/actions/create-campaign/create-campaign.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:202:49)

  • 5 others

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 27b4a7b and 6962ae8.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • components/clevertap/actions/create-campaign/create-campaign.mjs (1 hunks)
  • components/clevertap/actions/create-or-update-user/create-or-update-user.mjs (1 hunks)
  • components/clevertap/actions/get-campaign-report/get-campaign-report.mjs (1 hunks)
  • components/clevertap/actions/get-campaigns/get-campaigns.mjs (1 hunks)
  • components/clevertap/actions/stop-campaign/stop-campaign.mjs (1 hunks)
  • components/clevertap/actions/upload-events/upload-events.mjs (1 hunks)
  • components/clevertap/clevertap.app.mjs (3 hunks)
  • components/clevertap/common/utils.mjs (1 hunks)
  • components/clevertap/package.json (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • components/clevertap/package.json
🚧 Files skipped from review as they are similar to previous changes (8)
  • components/clevertap/actions/upload-events/upload-events.mjs
  • components/clevertap/actions/create-or-update-user/create-or-update-user.mjs
  • components/clevertap/common/utils.mjs
  • components/clevertap/clevertap.app.mjs
  • components/clevertap/actions/get-campaigns/get-campaigns.mjs
  • components/clevertap/actions/stop-campaign/stop-campaign.mjs
  • components/clevertap/actions/get-campaign-report/get-campaign-report.mjs
  • components/clevertap/actions/create-campaign/create-campaign.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

vercel bot commented Jul 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Jul 18, 2025 4:34pm
pipedream-docs ⬜️ Ignored (Inspect) Jul 18, 2025 4:34pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jul 18, 2025 4:34pm

Copy link
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: 2

🧹 Nitpick comments (5)
components/clevertap/actions/get-campaign-report/get-campaign-report.mjs (1)

19-35: Make the summary message more descriptive.

The current summary message is generic. Consider including the campaign ID to provide more context to the user.

-    $.export("$summary", "Successfully retrieved report for campaign");
+    $.export("$summary", `Successfully retrieved report for campaign ${campaignId}`);
components/clevertap/actions/get-campaigns/get-campaigns.mjs (2)

11-20: Consider adding date format validation.

The action expects dates in YYYYMMDD format but doesn't validate the input. Invalid date formats could cause API errors.

Consider adding validation or using a more user-friendly date input type:

    from: {
-      type: "string",
+      type: "string", 
       label: "From Date",
-      description: "Start of the date range for which you want to retrieve campaigns. Use `YYYYMMDD` format.",
+      description: "Start of the date range for which you want to retrieve campaigns. Use `YYYYMMDD` format (e.g., 20231201).",
+      optional: false,
    },
    to: {
-      type: "string",
+      type: "string",
       label: "To Date", 
-      description: "End of the date range for which you want to retrieve campaigns. Use `YYYYMMDD` format.",
+      description: "End of the date range for which you want to retrieve campaigns. Use `YYYYMMDD` format (e.g., 20231231).",
+      optional: false,
    },

37-37: Enhance the summary message with specific details.

Based on the retrieved learnings, summary messages should include specific counts when available to provide more useful feedback.

-    $.export("$summary", "Successfully retrieved campaigns");
+    $.export("$summary", `Successfully retrieved ${response.targets?.length || 0} campaigns`);
components/clevertap/actions/stop-campaign/stop-campaign.mjs (1)

30-30: Enhance the summary message with campaign details.

The summary message could be more specific by including the campaign ID that was stopped.

-    $.export("$summary", "Successfully stopped campaign");
+    $.export("$summary", `Successfully stopped campaign ${campaignId}`);
components/clevertap/actions/create-campaign/create-campaign.mjs (1)

117-117: Consider enhancing the summary message with campaign details.

The summary message could include the created campaign name for better feedback.

-    $.export("$summary", "Successfully created campaign");
+    $.export("$summary", `Successfully created campaign "${name}"`);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7f91bab and 32463b3.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • components/clevertap/actions/create-campaign/create-campaign.mjs (1 hunks)
  • components/clevertap/actions/create-or-update-user/create-or-update-user.mjs (1 hunks)
  • components/clevertap/actions/get-campaign-report/get-campaign-report.mjs (1 hunks)
  • components/clevertap/actions/get-campaigns/get-campaigns.mjs (1 hunks)
  • components/clevertap/actions/stop-campaign/stop-campaign.mjs (1 hunks)
  • components/clevertap/actions/upload-events/upload-events.mjs (1 hunks)
  • components/clevertap/clevertap.app.mjs (3 hunks)
  • components/clevertap/common/utils.mjs (1 hunks)
  • components/clevertap/package.json (2 hunks)
🧰 Additional context used
🧠 Learnings (8)
components/clevertap/package.json (1)
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.
components/clevertap/actions/create-or-update-user/create-or-update-user.mjs (1)
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
components/clevertap/actions/upload-events/upload-events.mjs (1)
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
components/clevertap/actions/stop-campaign/stop-campaign.mjs (1)
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
components/clevertap/actions/get-campaigns/get-campaigns.mjs (3)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
components/clevertap/actions/get-campaign-report/get-campaign-report.mjs (3)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
components/clevertap/actions/create-campaign/create-campaign.mjs (3)
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
components/clevertap/clevertap.app.mjs (1)
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (13)
components/clevertap/common/utils.mjs (1)

42-44: LGTM!

The export structure follows the expected pattern for utility modules.

components/clevertap/actions/upload-events/upload-events.mjs (1)

5-5: LGTM!

Version bump is appropriate for the package-wide update.

components/clevertap/package.json (2)

3-3: LGTM!

Minor version bump is appropriate for the new campaign functionality being added.


16-16: Check @pipedream/platform v3.1.0 upgrade in the CleverTap component

I ran rg "@pipedream/platform" under components/clevertap/ and didn’t find any direct imports of platform utilities (e.g. DEFAULT_POLLING_SOURCE_TIMER_INTERVAL). However, since the dependency jumped from v1.x to v3.x, please:

  • Review any platform APIs your component uses (e.g. defineAction, triggers, polling helpers, etc.) in
    • components/clevertap/**/*.js
  • Confirm that those APIs haven’t been renamed, moved, or removed in v3.1.0
  • Update imports or code paths if you encounter breaking changes

components/clevertap/package.json:

- "@pipedream/platform": "^1.5.1"
+ "@pipedream/platform": "^3.1.0"
components/clevertap/actions/create-or-update-user/create-or-update-user.mjs (1)

5-5: LGTM!

Version bump is appropriate for the package-wide update.

components/clevertap/actions/get-campaign-report/get-campaign-report.mjs (1)

3-18: LGTM!

The action structure follows the expected pattern with proper prop definitions and app integration.

components/clevertap/actions/create-campaign/create-campaign.mjs (3)

8-8: Verify the version number for a new file.

The version is set to 0.0.8 which seems high for a new file. Typically, new files start at 0.0.1.

Please confirm if this version number is correct or if it should be 0.0.1.


99-100: Good use of the parseJson utility.

The use of utils.parseJson() with fallback to empty objects is a good practice for handling JSON inputs safely.


101-113: Well-structured conditional content object.

The conditional construction of the content object is clean and avoids sending empty content fields to the API.

components/clevertap/clevertap.app.mjs (4)

6-21: Well-implemented campaignId propDefinition.

The campaignId propDefinition is well-structured with proper async options loading and error handling using optional chaining.


48-75: Consistent implementation of campaign methods.

All four new campaign methods (getCampaigns, createCampaign, getCampaignReport, stopCampaign) follow a consistent pattern with proper endpoint paths and POST method usage.


76-82: Good positioning of the uploadEvent method.

Moving the existing uploadEvent method after the new campaign methods maintains good organization without affecting its functionality.


35-47: _makeRequest signature change is backward-compatible

The updated _makeRequest still returns the axios Promise, so all existing callers (which use await) remain compatible. A repo-wide search showed no external consumers depending on it being declared async. No further changes required.

@jcortes jcortes force-pushed the clevertap-new-components branch 2 times, most recently from d00d425 to 34aba45 Compare July 14, 2025 22:13
Copy link
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: 3

🧹 Nitpick comments (3)
components/clevertap/actions/stop-campaign/stop-campaign.mjs (2)

11-35: Consider making date range props optional for better UX.

The from and to props are only used to filter the campaign list in the campaignId dropdown. For stopping a campaign, users might already know the campaign ID, making date filtering an unnecessary step. Consider making these optional to streamline the user experience.

    from: {
      propDefinition: [
        app,
        "from",
      ],
+     optional: true,
    },
    to: {
      propDefinition: [
        app,
        "to",
      ],
+     optional: true,
    },

50-50: Include campaign ID in the success message for clarity.

The success message should include the campaign ID to provide better feedback to the user about which campaign was stopped.

-    $.export("$summary", "Successfully stopped campaign");
+    $.export("$summary", `Successfully stopped campaign with ID: ${campaignId}`);
components/clevertap/actions/create-campaign/create-campaign.mjs (1)

299-299: Include campaign name in the success message for better feedback.

Following the pattern from retrieved learnings about properly formatted success messages, include the campaign name to provide better context.

-    $.export("$summary", "Successfully created campaign");
+    $.export("$summary", `Successfully created campaign "${name}"`);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d00d425 and 34aba45.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • components/clevertap/actions/create-campaign/create-campaign.mjs (1 hunks)
  • components/clevertap/actions/create-or-update-user/create-or-update-user.mjs (1 hunks)
  • components/clevertap/actions/get-campaign-report/get-campaign-report.mjs (1 hunks)
  • components/clevertap/actions/get-campaigns/get-campaigns.mjs (1 hunks)
  • components/clevertap/actions/stop-campaign/stop-campaign.mjs (1 hunks)
  • components/clevertap/actions/upload-events/upload-events.mjs (1 hunks)
  • components/clevertap/clevertap.app.mjs (3 hunks)
  • components/clevertap/common/utils.mjs (1 hunks)
  • components/clevertap/package.json (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • components/clevertap/package.json
🚧 Files skipped from review as they are similar to previous changes (6)
  • components/clevertap/actions/get-campaign-report/get-campaign-report.mjs
  • components/clevertap/clevertap.app.mjs
  • components/clevertap/actions/upload-events/upload-events.mjs
  • components/clevertap/actions/get-campaigns/get-campaigns.mjs
  • components/clevertap/common/utils.mjs
  • components/clevertap/actions/create-or-update-user/create-or-update-user.mjs
🧰 Additional context used
🧠 Learnings (2)
components/clevertap/actions/stop-campaign/stop-campaign.mjs (1)
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
components/clevertap/actions/create-campaign/create-campaign.mjs (3)
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base

@jcortes jcortes force-pushed the clevertap-new-components branch from 34aba45 to cd7da18 Compare July 14, 2025 22:37
luancazarine
luancazarine previously approved these changes Jul 16, 2025
Copy link
Collaborator

@luancazarine luancazarine left a comment

Choose a reason for hiding this comment

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

Hi @jcortes, LGTM! Ready for QA!

@jcortes
Copy link
Collaborator Author

jcortes commented Jul 18, 2025

/approve

@jcortes jcortes force-pushed the clevertap-new-components branch from 8c59ff5 to 27b4a7b Compare July 18, 2025 15:17
@jcortes
Copy link
Collaborator Author

jcortes commented Jul 18, 2025

/approve

@jcortes jcortes force-pushed the clevertap-new-components branch from 27b4a7b to 6962ae8 Compare July 18, 2025 16:34
@jcortes jcortes merged commit 08a7684 into master Jul 18, 2025
11 checks passed
@jcortes jcortes deleted the clevertap-new-components branch July 18, 2025 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ACTION] Clevertap extend mcp servers to Campaign API
3 participants