Skip to content

Add HubSpot Events Completions connector sample - #155

Merged
daneshk merged 3 commits into
wso2:mainfrom
daneshk:add-hubspot-events-completions-sample
Aug 11, 2026
Merged

Add HubSpot Events Completions connector sample#155
daneshk merged 3 commits into
wso2:mainfrom
daneshk:add-hubspot-events-completions-sample

Conversation

@daneshk

@daneshk daneshk commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds the sample integration referenced by the deterministic Try it yourself link on the connector's example documentation (wso2/docs-integrator#618), which currently 404s without this PR.
  • The sample is a WSO2 Integrator automation that sends a single custom behavioral event occurrence to HubSpot using ballerinax/hubspot.events.completions's sendEvent operation, then logs the resulting HTTP status.
  • No credentials included — the HubSpot access token and event name are both empty configurable variables (accessToken, eventName), matching the connector's own example documentation.

Test plan

  • bal build succeeds cleanly against this exact source
  • Verified no secrets, local paths, or other sensitive content in any file

🤖 Generated with Claude Code

Sample integration built in WSO2 Integrator demonstrating the
ballerinax/hubspot.events.completions connector's Send Event operation:
an Automation entry point that sends a single custom behavioral event
occurrence to HubSpot and logs the resulting HTTP status.

Referenced from the connector's example documentation on docs-integrator
(wso2/docs-integrator#618) via the deterministic "Try it yourself" link,
which currently 404s without this PR.
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@daneshk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 14 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f22bbb7-ffc7-427e-95f4-c61f85ea42df

📥 Commits

Reviewing files that changed from the base of the PR and between eec3c22 and 4daed08.

📒 Files selected for processing (10)
  • integrator-default-profile/connectors/hubspot.events.completions_connector_sample/.gitignore
  • integrator-default-profile/connectors/hubspot.events.completions_connector_sample/Ballerina.toml
  • integrator-default-profile/connectors/hubspot.events.completions_connector_sample/agents.bal
  • integrator-default-profile/connectors/hubspot.events.completions_connector_sample/automation.bal
  • integrator-default-profile/connectors/hubspot.events.completions_connector_sample/config.bal
  • integrator-default-profile/connectors/hubspot.events.completions_connector_sample/connections.bal
  • integrator-default-profile/connectors/hubspot.events.completions_connector_sample/data_mappings.bal
  • integrator-default-profile/connectors/hubspot.events.completions_connector_sample/functions.bal
  • integrator-default-profile/connectors/hubspot.events.completions_connector_sample/main.bal
  • integrator-default-profile/connectors/hubspot.events.completions_connector_sample/types.bal
📝 Walkthrough

Summary

  • Added a WSO2 Integrator sample for the HubSpot Events Completions connector.
  • Added configurable accessToken and eventName values.
  • Implemented the sendEvent operation and response status logging.
  • Added package metadata and build configuration.
  • Confirmed that bal build succeeds.

Walkthrough

The sample adds a Ballerina package manifest and ignore rules. It defines configurable HubSpot access and event name settings. It initializes an authenticated Events Completions client. Its public main function sends the configured event, logs the HTTP status on success, and logs and returns errors on failure.

Sequence Diagram(s)

sequenceDiagram
  participant Main as Ballerina main
  participant Client as completionsClient
  participant HubSpot as HubSpot Events Completions API
  Main->>Client: Send configured event
  Client->>HubSpot: Submit completion event
  HubSpot-->>Client: Return HTTP response
  Client-->>Main: Return response or error
Loading

Suggested reviewers: gayaldassanayake

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the sample purpose and test plan but omits most required template sections, including release note, documentation, security checks, and test environment. Update the description to use the repository template and complete the required sections, or mark non-applicable sections with a brief explanation.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding a HubSpot Events Completions connector sample.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@integrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/automation.bal`:
- Around line 6-10: Update the sendEvent flow in the completion handler to
inspect httpResponse.statusCode.value() before logging success. Log “Event sent”
only when the status is 204; for every other HTTP status, return an error
instead of treating the response as successful, while preserving the existing
failure-handler behavior.
🪄 Autofix

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

Plan: Pro Plus

Run ID: b853a342-60a5-435d-9ecd-f2ebada1e670

📥 Commits

Reviewing files that changed from the base of the PR and between ea94e5c and eec3c22.

📒 Files selected for processing (10)
  • integrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/.gitignore
  • integrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/Ballerina.toml
  • integrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/agents.bal
  • integrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/automation.bal
  • integrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/config.bal
  • integrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/connections.bal
  • integrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/data_mappings.bal
  • integrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/functions.bal
  • integrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/main.bal
  • integrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/types.bal

Every existing sample under integrator-default-profile/connectors/ drops the
org prefix (hubspot.crm.pipelines_connector_sample, aws.s3_connector_sample —
not "ballerinax_..."). Renamed to hubspot.events.completions_connector_sample
and updated Ballerina.toml's name/title fields to match. Verified it still
builds cleanly under the new name.
daneshk added a commit to daneshk/docs-integrator that referenced this pull request Aug 10, 2026
wso2/integration-samples#155 renamed the sample to drop the "ballerinax_"
prefix, matching every other connector sample in that repo
(hubspot.crm.pipelines_connector_sample, not
ballerinax_hubspot_crm_pipelines_connector_sample). Updated both the Devant
deploy link and the GitHub source link here to match.
@daneshk
daneshk merged commit 42c512a into wso2:main Aug 11, 2026
2 checks passed
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.

2 participants