HubSpot ACTION
Update Fields on the Form
Update some of the form definition components. See the documentation
- Action
- Writes data
- Destructive
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's HubSpot account once, then configure and run Update Fields on the Form 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-update-fields-on-the-form",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
hubspot: { authProvisionId: "apn_xxxxxxx" },
formId: "Form ID",
name: "Name",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "hubspot-update-fields-on-the-form",
"configured_props": {
"hubspot": { "authProvisionId": "apn_xxxxxxx" },
"formId": "Form ID",
"name": "Name"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "hubspot",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "hubspot-update-fields-on-the-form",
arguments: {
formId: "Form ID",
name: "Name",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
formId Form ID | string | The ID of the form to update. Required Dynamic |
name Name | string | The name of the form. Optional |
archived Archived | boolean | Whether the form is archived. Optional |
fieldGroups Field Groups | string[] | A list for objects of group type and fields. Format: [{ "groupType": "default_group", "richTextType": "text", "fields": [ { "objectTypeId": "0-1", "name": "email", "label": "Email", "required": true, "hidden": false, "fieldType": "email", "validation": { "blockedEmailDomains": [], "useDefaultBlockList": false }}]}] See the documentation for more information. Optional |
createNewContactForNewEmail Create New Contact for New Email | boolean | Whether to create a new contact when a form is submitted with an email address that doesn't match any in your existing contacts records. Optional |
editable Editable | boolean | Whether the form can be edited. Optional |
allowLinkToResetKnownValues Allow Link to Reset Known Values | boolean | Whether to add a reset link to the form. This removes any pre-populated content on the form and creates a new contact on submission. Optional |
lifecycleStages Lifecycle Stages | string[] | A list of objects of lifecycle stages. Format: [{ "objectTypeId": "0-1", "value": "subscriber" }] See the documentation for more information. Optional |
postSubmitActionType Post Submit Action Type | string | The action to take after submit. The default action is displaying a thank you message. Optional |
postSubmitActionValue Post Submit Action Value | string | The thank you text or the page to redirect to. Optional |
language Language | string | The language of the form. Optional |
prePopulateKnownValues Pre-populate Known Values | boolean | Whether contact fields should pre-populate with known information when a contact returns to your site. Optional |
cloneable Cloneable | boolean | Whether the form can be cloned. Optional |
notifyContactOwner Notify Contact Owner | boolean | Whether to send a notification email to the contact owner when a submission is received. Optional |
recaptchaEnabled Recaptcha Enabled | boolean | Whether CAPTCHA (spam prevention) is enabled. Optional |
archivable Archivable | boolean | Whether the form can be archived. Optional |
notifyRecipients Contact Email | string[] | Note - this needs to be a contact that already exists within HubSpot. You may need to add a Create or Update Contact step before this one. Then, use the email created in that step in this field. Optional Dynamic |
renderRawHtml Render Raw HTML | boolean | Whether the form will render as raw HTML as opposed to inside an iFrame. Optional |
cssClass CSS Class | string | The CSS class of the form. Optional |
theme Theme | string | The theme used for styling the input fields. This will not apply if the form is added to a HubSpot CMS page`. Optional |
submitButtonText Submit Button Text | string | The text displayed on the form submit button. Optional |
labelTextSize Label Text Size | string | The size of the label text. Optional |
legalConsentTextColor Legal Consent Text Color | string | The color of the legal consent text. Optional |
fontFamily Font Family | string | The font family of the form. Optional |
legalConsentTextSize Legal Consent Text Size | string | The size of the legal consent text. Optional |
backgroundWidth Background Width | string | The width of the background. Optional |
helpTextSize Help Text Size | string | The size of the help text. Optional |
submitFontColor Submit Font Color | string | The color of the submit font. Optional |
labelTextColor Label Text Color | string | The color of the label text. Optional |
submitAlignment Submit Alignment | string | The alignment of the submit button. Optional |
submitSize Submit Size | string | The size of the submit button. Optional |
helpTextColor Help Text Color | string | The color of the help text. Optional |
submitColor Submit Color | string | The color of the submit button. Optional |
legalConsentOptionsType Legal Consent Options Type | string | The type of legal consent options. Optional |
legalConsentOptionsObject Legal Consent Options Object | object | The object of legal consent options. Format: {"subscriptionTypeIds": [1,2,3], "lawfulBasis": "lead", "privacy": "string"} See the documentation for more information. Optional |
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-update-fields-on-the-form
- Version
- 0.0.16
- App
- HubSpot
- Authentication
- OAuth
- Read-only
- No
- Destructive
- Yes
- Open world
- Yes
- Source
- View on GitHub ↗