Skip to content

Conversation

luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Oct 13, 2025

Resolves #14336

Summary by CodeRabbit

  • New Features
    • Added Aweber "Create Broadcast" action (subject, body HTML/Text/AMP, tracking, list include/exclude, integrations, segment, archive, notify).
    • Added "New Broadcast Event" trigger with status filter (draft/scheduled/sent) and dynamic pickers for lists, segments, and integrations.
  • Bug Fixes
    • Event deduplication now falls back to UUID when ID is missing.
  • Chores
    • Package and action version bumps across Aweber components.
  • Tests
    • Added sample payloads for broadcast and subscriber events.

- Added `createBroadcast` action to facilitate broadcast creation.
- Introduced `New Broadcast Event` source to emit events for new broadcasts.
- Updated existing actions to version 0.0.5 and adjusted descriptions for clarity.
- Added new properties for list and integration options in the Aweber app.
- Updated package version to 0.4.0 and dependencies to ensure compatibility.
@luancazarine luancazarine linked an issue Oct 13, 2025 that may be closed by this pull request
Copy link

vercel bot commented Oct 13, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Oct 15, 2025 1:10pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Oct 15, 2025 1:10pm

Copy link
Contributor

coderabbitai bot commented Oct 13, 2025

Walkthrough

Adds a Create Broadcast action and New Broadcast Event source; extends the Aweber app with propDefinitions and methods for broadcasts, segments, and integrations; introduces test fixtures and sampleEmit; updates request header handling and generateMeta id fallback; bumps package and several action/source versions.

Changes

Cohort / File(s) Summary
New Action: Create Broadcast
components/aweber/actions/create-broadcast/create-broadcast.mjs
New default-export action mapping props to API fields, calls aweberApp.createBroadcast with Content-Type application/x-www-form-urlencoded, returns API response and summary with created broadcast UUID.
AWeber App Enhancements
components/aweber/aweber.app.mjs
Added propDefinitions (listSelfLink, integrations, segmentSelfLink) with async options; added methods getBroadcasts, getSegments, getIntegrations, createBroadcast; updated makeRequest to accept headers.
New Source: New Broadcast Event
components/aweber/sources/new-broadcast-event/new-broadcast-event.mjs, components/aweber/sources/new-broadcast-event/test-event.mjs
New polling source for broadcasts using getBroadcasts; supports status filter; emits summary from resource.subject; includes test-event fixture.
Source Utility Update
components/aweber/sources/common.mjs
Moved import placement; generateMeta(resource) now uses `resource.id
Subscriber Added: sampleEmit + fixture
components/aweber/sources/subscriber-added/subscriber-added.mjs, components/aweber/sources/subscriber-added/test-event.mjs
Added sampleEmit import/property to subscriber-added source and added static subscriber test-event fixture; bumped source version to 0.0.5.
Version Bumps: Actions
components/aweber/actions/add-subscriber/add-subscriber.mjs, components/aweber/actions/create-or-update-subscriber/create-or-update-subscriber.mjs, components/aweber/actions/get-accounts/get-accounts.mjs, components/aweber/actions/get-lists/get-lists.mjs, components/aweber/actions/get-subscribers/get-subscribers.mjs, components/aweber/actions/update-subscriber/update-subscriber.mjs
Incremented version fields in multiple action modules (no behavioral changes).
Package Metadata
components/aweber/package.json
Bumped package version 0.3.70.4.0; updated dependency @pipedream/platform from ^1.2.0^3.1.0.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Action as Create Broadcast Action
  participant App as aweber.app
  participant API as AWeber API

  User->>Action: Execute with props (accountId, listId, subject, body, ...)
  Action->>App: createBroadcast(accountId, listId, data, { headers })
  App->>API: POST /accounts/{accountId}/lists/{listId}/broadcasts
  Note right of API: Content-Type: application/x-www-form-urlencoded
  API-->>App: 201 Created (broadcast payload with uuid)
  App-->>Action: Broadcast response
  Action-->>User: Summary: Created broadcast {uuid}
Loading
sequenceDiagram
  autonumber
  participant Source as New Broadcast Event Source
  participant App as aweber.app
  participant API as AWeber API
  participant PD as Pipedream Runtime

  loop Poll interval
    Source->>App: getBroadcasts(accountId, listId, { status })
    App->>API: GET /accounts/{accountId}/lists/{listId}/broadcasts?status=...
    API-->>App: List of broadcasts
    App-->>Source: Broadcast list
    Source->>Source: generateMeta(resource.id || resource.uuid)
    alt New resource
      Source->>PD: $emit(resource, {summary: "New broadcast event {subject}"})
    else Already seen
      Source->>Source: Skip
    end
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

I twitch my whiskers at a broadcast new,
Drafts and subjects bathed in morning dew,
Segments and lists and integrations too,
I hop to trigger, pack, and send it through,
A rabbit's cheer — hooray, the update's due! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title “14336 aweber” only references the issue number and the app name without summarizing the key changes or their intent, so it does not clearly convey the main purpose of the pull request to reviewers scanning history. Please rename the title to a concise, descriptive summary of the primary changes such as “Add Create Broadcast action and new broadcast event source for Aweber integration.”
Description Check ⚠️ Warning The pull request description contains only “Resolves #14336” and does not include the required “## WHY” section or any details about the motivation, changes made, or testing instructions as specified by the repository’s template. Please complete the description by filling out the “## WHY” section from the template and providing a concise summary of the problem being solved, key changes, and any testing or validation steps.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues Check ✅ Passed The changes implement the Aweber integration objectives by adding the Create Broadcast action and supporting API methods, introducing a new broadcast event source, and updating existing subscriber triggers, which fulfills the linked issue’s requirements for implementing actions and triggers via the Aweber API.
Out of Scope Changes Check ✅ Passed All modifications, including version bumps across actions, package dependency updates, new app methods, and source definitions, directly support the Aweber integration objectives and are not unrelated changes, so no out-of-scope code was introduced.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 14336-aweber

📜 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 5671e0d and e088d8f.

📒 Files selected for processing (2)
  • components/aweber/actions/create-broadcast/create-broadcast.mjs (1 hunks)
  • components/aweber/sources/new-broadcast-event/new-broadcast-event.mjs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/aweber/sources/new-broadcast-event/new-broadcast-event.mjs
🧰 Additional context used
🧬 Code graph analysis (1)
components/aweber/actions/create-broadcast/create-broadcast.mjs (2)
components/aweber/actions/create-or-update-subscriber/create-or-update-subscriber.mjs (1)
  • response (87-98)
components/aweber/actions/update-subscriber/update-subscriber.mjs (1)
  • response (74-87)
⏰ 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). (3)
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components

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

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

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: 5

🧹 Nitpick comments (1)
components/aweber/sources/new-broadcast-event/new-broadcast-event.mjs (1)

23-32: Consider enhancing the status field description.

The current description "The status of the broadcast event" is brief. Consider clarifying that this field filters which broadcast events are emitted based on their status.

Apply this diff to improve clarity:

     status: {
       type: "string",
       label: "Status",
-      description: "The status of the broadcast event.",
+      description: "Filter broadcast events by status. Only events matching this status will be emitted.",
       options: [
         "draft",
         "scheduled",
         "sent",
       ],
     },
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7f84b6d and 76006bd.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (14)
  • components/aweber/actions/add-subscriber/add-subscriber.mjs (1 hunks)
  • components/aweber/actions/create-broadcast/create-broadcast.mjs (1 hunks)
  • components/aweber/actions/create-or-update-subscriber/create-or-update-subscriber.mjs (1 hunks)
  • components/aweber/actions/get-accounts/get-accounts.mjs (1 hunks)
  • components/aweber/actions/get-lists/get-lists.mjs (1 hunks)
  • components/aweber/actions/get-subscribers/get-subscribers.mjs (1 hunks)
  • components/aweber/actions/update-subscriber/update-subscriber.mjs (1 hunks)
  • components/aweber/aweber.app.mjs (5 hunks)
  • components/aweber/package.json (2 hunks)
  • components/aweber/sources/common.mjs (2 hunks)
  • components/aweber/sources/new-broadcast-event/new-broadcast-event.mjs (1 hunks)
  • components/aweber/sources/new-broadcast-event/test-event.mjs (1 hunks)
  • components/aweber/sources/subscriber-added/subscriber-added.mjs (2 hunks)
  • components/aweber/sources/subscriber-added/test-event.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/aweber/actions/create-broadcast/create-broadcast.mjs (2)
components/aweber/actions/create-or-update-subscriber/create-or-update-subscriber.mjs (1)
  • response (87-98)
components/aweber/actions/update-subscriber/update-subscriber.mjs (1)
  • response (74-87)
⏰ 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: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (12)
components/aweber/actions/update-subscriber/update-subscriber.mjs (1)

9-9: LGTM!

Version bump is consistent with the broader package updates in this PR.

components/aweber/sources/common.mjs (2)

1-1: LGTM!

Import organization improvement.


67-67: Good defensive fallback for broadcast events.

The fallback to resource.uuid accommodates broadcast resources that use uuid as their primary identifier instead of id. This aligns with the test fixture in new-broadcast-event/test-event.mjs which uses uuid.

components/aweber/package.json (2)

3-3: LGTM!

Version bump aligns with the new features and updates in this PR.


13-13: Resolve — @pipedream/platform 3.1.0 verified for this component.
Aweber imports axios, ConfigurationError and DEFAULT_POLLING_SOURCE_TIMER_INTERVAL (components/aweber/aweber.app.mjs, common/utils.mjs, sources/common.mjs); platform v3.1.0 (platform/dist/index.js and .d.ts) exports these symbols. No changes required.

components/aweber/sources/subscriber-added/subscriber-added.mjs (2)

3-3: LGTM!

Good pattern for wiring test fixtures to the source component. The sampleEmit field provides clear example payloads for testing and documentation.

Also applies to: 31-31


11-11: LGTM!

Version bump is consistent with the addition of the sampleEmit field.

components/aweber/sources/new-broadcast-event/test-event.mjs (1)

1-9: LGTM!

The broadcast event test fixture provides a comprehensive sample payload with all relevant fields (uuid, broadcast_id, timestamps, status, subject).

components/aweber/sources/new-broadcast-event/new-broadcast-event.mjs (1)

1-11: LGTM!

The source implementation follows the established pattern from other Aweber sources. The structure is clean, methods are well-defined, and the resource fetching logic is appropriate.

Also applies to: 34-54

components/aweber/aweber.app.mjs (3)

110-217: LGTM!

The three new propDefinitions (listSelfLink, integrations, segmentSelfLink) follow consistent patterns with existing prop definitions. They provide async options fetching with pagination support and clear labeling. The segmentSelfLink description is particularly helpful in explaining the optional nature and default behavior.


270-275: LGTM!

Cleaner headers handling by accepting headers as an explicit parameter rather than extracting from otherArgs. This improves the method signature clarity.


304-361: LGTM!

The four new methods (getBroadcasts, getSegments, getIntegrations, createBroadcast) follow the established patterns in the codebase. They correctly construct API paths and propagate arguments.

- Corrected "HMTL" to "HTML" in the `bodyText` description for clarity.
- Fixed the spelling of `clickTrackingEnabeld` to `clickTrackingEnabled` in the properties.
- Changed readOnlyHint from true to false in the Aweber create-broadcast action to enable editing capabilities.
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: 1

♻️ Duplicate comments (1)
components/aweber/actions/create-broadcast/create-broadcast.mjs (1)

155-157: Content-Type header should be application/json.

The header is still set to "application/x-www-form-urlencoded" but the payload is a JavaScript object that axios serializes as JSON. This issue was previously flagged and remains unresolved.

Apply this diff to fix the Content-Type header:

       headers: {
-        "Content-Type": "application/x-www-form-urlencoded",
+        "Content-Type": "application/json",
       },

Alternatively, remove the explicit Content-Type header and let axios set it automatically based on the request body type.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 44b6eb2 and 68a4918.

📒 Files selected for processing (1)
  • components/aweber/actions/create-broadcast/create-broadcast.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/aweber/actions/create-broadcast/create-broadcast.mjs (2)
components/aweber/actions/create-or-update-subscriber/create-or-update-subscriber.mjs (1)
  • response (87-98)
components/aweber/actions/update-subscriber/update-subscriber.mjs (1)
  • response (74-87)
⏰ 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: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components

Copy link
Collaborator

@GTFalcao GTFalcao left a comment

Choose a reason for hiding this comment

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

Just one comment about the Body HTML and Body Text properties - I think this needs to be revised before moving forward

- Marked both `bodyHtml` and `bodyText` properties as optional in the create-broadcast action to enhance flexibility in message creation.
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: 1

♻️ Duplicate comments (1)
components/aweber/actions/create-broadcast/create-broadcast.mjs (1)

157-159: Content-Type header is still incorrect.

As flagged in a previous review, the Content-Type header is set to application/x-www-form-urlencoded, but the data object is a JavaScript object that axios will serialize as JSON. The header should be application/json or omitted entirely to let axios set it automatically.

Apply this diff to fix the header:

       },
       headers: {
-        "Content-Type": "application/x-www-form-urlencoded",
+        "Content-Type": "application/json",
       },
     });

Alternatively, remove the explicit Content-Type header:

       },
-      headers: {
-        "Content-Type": "application/x-www-form-urlencoded",
-      },
     });
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 68a4918 and 5671e0d.

📒 Files selected for processing (1)
  • components/aweber/actions/create-broadcast/create-broadcast.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/aweber/actions/create-broadcast/create-broadcast.mjs (2)
components/aweber/actions/create-or-update-subscriber/create-or-update-subscriber.mjs (1)
  • response (87-98)
components/aweber/actions/update-subscriber/update-subscriber.mjs (1)
  • response (74-87)
⏰ 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: Publish TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (1)
components/aweber/actions/create-broadcast/create-broadcast.mjs (1)

9-13: LGTM! Annotations are correct.

The readOnlyHint: false annotation is now correct for this write operation, and the other annotations are appropriate for a create action.

Copy link
Collaborator

@jcortes jcortes left a comment

Choose a reason for hiding this comment

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

Hi @luancazarine lgtm! I've just added a couple of suggestions. Ready for QA.

@luancazarine
Copy link
Collaborator Author

/approve

@luancazarine luancazarine merged commit 10448cc into master Oct 15, 2025
10 checks passed
@luancazarine luancazarine deleted the 14336-aweber branch October 15, 2025 20: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.

Aweber

3 participants