HubSpot Marketing v2

Provides integration with HubSpot Marketing to query campaigns and emails, create and update campaign and email draft content, delete campaigns, and manage campaign asset associations. Use it to coordinate marketing data with other business systems.

HubSpot Marketing manages marketing campaigns, their associated assets, and marketing email content.

Revision History

0.1.0.4 - Added S256 PKCE account authorization.

Connection

Use a HubSpot OAuth Connection with the scopes required by the selected operations.

Property Type Description
Client ID String OAuth client identifier issued for the app.
Client Secret Masked OAuth client secret issued for the app.
Access Token Masked Access token populated through account authorization.
Refresh Token Masked Refresh token used to renew access and updated when the provider rotates it.
Access Token Expires At UTC String Stored UTC expiry used to refresh the access token proactively.
Granted Scopes String Space-delimited scopes reported by HubSpot and used to filter available templates.
PKCE Verifiers Masked Hidden authorization state managed automatically by Flowgear. Do not enter or edit it manually.

Setup Notes

  • Run this Node on a Cloud Runtime.
  • Configure your HubSpot app with the Flowgear callback URL and the scopes oauth, marketing.campaigns.read, marketing.campaigns.write, and content.
  • Enter the client credentials and complete account authorization for the target HubSpot account. Flowgear handles S256 PKCE automatically; no verifier setup is required.
  • Test the Connection after authorization. Flowgear stores token expiry and granted scopes.
  • Campaign APIs require Marketing Hub Professional or Enterprise. Marketing email capabilities depend on the account entitlements.

Methods

Select a campaign, email, or asset template under the relevant method.

Query

Searches campaigns, retrieves a campaign, lists campaign assets, lists marketing emails, or retrieves a marketing email and its available statistics.

Parameter Type Description
Connection Connection Connection used to authenticate the selected operation.
OperationId String Operation identifier populated by the selected template. Select a template instead of entering this manually.
Options Object Route and query values from the selected template, such as CampaignId, EmailId, asset type, name, date range, or sort.
Return Type Description
Response Array Provider-shaped business rows without a Flowgear object. Collection queries with no matches return zero rows.

Create

Creates a campaign or marketing email draft.

Parameter Type Description
Connection Connection Connection used to authenticate the selected operation.
OperationId String Operation identifier populated by the selected template. Select a template instead of entering this manually.
Items Array Campaign or email fields from the selected template. Campaign properties are direct item fields, without a properties wrapper.
Return Type Description
Response Array Provider response fields with Flowgear.IsSuccess, Flowgear.Message, and Flowgear.Request for each processed request.

Update

Updates a campaign or marketing email draft.

Parameter Type Description
Connection Connection Connection used to authenticate the selected operation.
OperationId String Operation identifier populated by the selected template. Select a template instead of entering this manually.
Items Array The target identifier and fields to change. Campaign fields stay flat, as in Create.
Return Type Description
Response Array Provider response fields with Flowgear.IsSuccess, Flowgear.Message, and Flowgear.Request for each processed request.

Delete

Deletes a marketing campaign.

Parameter Type Description
Connection Connection Connection used to authenticate the selected operation.
OperationId String Operation identifier populated by the selected template. Select a template instead of entering this manually.
Items Array One object per campaign, containing the campaign identifier from the selected template.
Return Type Description
Response Array Provider response fields with Flowgear.IsSuccess, Flowgear.Message, and Flowgear.Request for each processed request.

Action

Associates an existing asset with a campaign or removes that association.

Parameter Type Description
Connection Connection Connection used to authenticate the selected operation.
OperationId String Operation identifier populated by the selected template. Select a template instead of entering this manually.
Items Array Campaign identifier, asset type, and asset identifier from the selected template.
Return Type Description
Response Array Provider response fields with Flowgear.IsSuccess, Flowgear.Message, and Flowgear.Request for each processed request.

Usage Notes

  • Collection queries follow HubSpot continuation cursors. No matches produce zero rows; provider query errors surface to the Workflow.
  • The first provider request runs before output streaming begins. Mutations return one result per processed item, including handled provider failures.
  • Templates are filtered by granted scopes. Campaign reads need marketing.campaigns.read, campaign mutations and asset actions need marketing.campaigns.write, and email operations need content.
  • For campaign creation and updates, Flowgear adds the provider-required properties wrapper when sending the request.
  • Use the separate HubSpot CRM Node for CRM objects.

Known Issues

  • Transactional email sending, forms, and marketing events are outside this Node's supported surface.
  • This Node creates and updates email drafts; it does not expose an email-send method.