Add HubSpot Events Completions connector sample - #155
Conversation
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.
|
Warning Review limit reached
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 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
📝 WalkthroughSummary
WalkthroughThe 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 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
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (10)
integrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/.gitignoreintegrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/Ballerina.tomlintegrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/agents.balintegrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/automation.balintegrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/config.balintegrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/connections.balintegrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/data_mappings.balintegrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/functions.balintegrator-default-profile/connectors/ballerinax_hubspot_events_completions_connector_sample/main.balintegrator-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.
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.
Summary
ballerinax/hubspot.events.completions'ssendEventoperation, then logs the resulting HTTP status.configurablevariables (accessToken,eventName), matching the connector's own example documentation.Test plan
bal buildsucceeds cleanly against this exact source🤖 Generated with Claude Code