View as Markdown
HubSpot icon

HubSpot ACTION

Create Engagement

Create a task, meeting, email, call, or note engagement with optional associations. If the request does not make the engagement type clear, ask which type (note, task, meeting, email, or call) before creating rather than guessing. Set Engagement Type and pass engagement fields in Object Properties (HubSpot property names, e.g. hs_note_body for notes). No reloadProps step and no CONFIGURE_COMPONENT requirement: association fields accept raw HubSpot IDs (use Search CRM or the Associations API to resolve associationType when needed). For only a note on a contact by ID, Add Note to Contact (hubspot-add-note-to-contact) is still simpler. See the documentation
  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's HubSpot account once, then configure and run Create Engagement from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "hubspot-create-engagement",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    hubspot: { authProvisionId: "apn_xxxxxxx" },
    engagementType: "Engagement Type",
    toObjectType: "Associated Object Type",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Engagement inputs
Property Type Description
engagementType Engagement Type string
One of: notes, tasks, meetings, emails, or calls (case-insensitive; NOTE / note map to notes). Defines the CRM object type created and which properties belong in Object Properties. For note on contact by ID, consider Add Note to Contact instead.
Required
toObjectType Associated Object Type string
HubSpot object type for the record to associate (e.g. contact or contacts, companies, deals, tickets). Required when Associated Object ID and Association Type ID are set together. Use the plural object name or your custom object’s API name / fullyQualifiedName.
Optional
toObjectId Associated Object ID string
Numeric record ID to associate (string is fine). Optional unless you set Association Type ID.
Optional
associationType Association Type ID string
HubSpot association typeId between this engagement type and Associated Object Type (integer as string or number). Resolve via HubSpot associations API or Search CRM; omit if you are not associating a record.
Optional
objectProperties Object Properties object
Writable HubSpot properties for the engagement as key/value pairs (same shape as the CRM API properties object). Example for a note: { "hs_note_body": "Hello from Pipedream" }.
Required

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
hubspot-create-engagement
Version
1.0.1
App
HubSpot
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes