Skip to content

HubSpot: Create sequence

HubSpot sequences.createSequence: arguments, response, policy and SDK examples.

← Sequences operations · Get started

Operation hubspot.sequences_create_sequence

Provider route: POST /automation/sequences/2026-09/serviceaccounts/sequences. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/hubspot with npm, or alter-sdk-hubspot with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { HubSpotIntegration } from "@alter-ai/hubspot";
async function execute(input: Parameters<HubSpotIntegration["sequences"]["createSequence"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new HubSpotIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.sequences.createSequence(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_hubspot import HubSpotIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = HubSpotIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.sequences.create_sequence(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyModelRequired within parentExpand Create sequence — request body — body

Referenced models: Create sequence — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Create sequence — response body

Referenced models: Create sequence — response body

11 more schemas are linked from the tables above, on the schema pages.

Create sequence — response body
FieldTypePresenceDescription and constraints
$objectRoot
sequenceModelRequired within parentExpand Update sequence — response body
userViewModelOptionalExpand Create sequence — response body — user View

Referenced models: Create sequence — response body — user View, Update sequence — response body

Create sequence — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
dependenciesarrayRequired within parentAn array of dependencies between sequence steps, each defined by the PublicSequenceStepDependencyRequest schema.
dependencies[]ModelEach itemExpand Create sequence — request body — body dependencies item
dynamicbooleanRequired within parentA boolean indicating whether the sequence is dynamic.
engagementTriggersModelOptionalExpand Create sequence — request body — body engagement Triggers
folderIdstringOptionalThe identifier of the folder where the sequence is stored. It is a string.
namestringRequired within parentThe name of the sequence. It is a string.
settingsModelRequired within parentExpand Create sequence — request body — body settings
stepsarrayRequired within parentAn array of steps in the sequence, each defined by the PublicSequenceStepRequest schema.
steps[]ModelEach itemExpand Create sequence — request body — body steps item

Referenced models: Create sequence — request body — body engagement Triggers, Create sequence — request body — body settings, Create sequence — request body — body dependencies item, Create sequence — request body — body steps item

Create sequence — response body — user View
FieldTypePresenceDescription and constraints
$objectRoot
emailstringOptionalThe email address of the user. It is a string.
firstNamestringOptionalThe first name of the user. It is a string.
lastNamestringOptionalThe last name of the user. It is a string.
Update sequence — response body
FieldTypePresenceDescription and constraints
$objectRoot
createdAtstringRequired within parentThe date and time when the sequence was created, in ISO 8601 format.
Format: date-time
dependenciesarrayRequired within parentAn array of dependencies between steps in the sequence, each represented by a PublicSequenceStepDependencyResponse object.
dependencies[]ModelEach itemExpand Update sequence — response body — dependencies item
folderIdstringOptionalThe identifier for the folder containing the sequence.
idstringRequired within parentThe unique identifier for the sequence.
namestringRequired within parentThe name of the sequence.
settingsModelOptionalExpand Update sequence — response body — settings
stepsarrayRequired within parentAn array of steps included in the sequence, each represented by a PublicSequenceStepResponseV2 object.
steps[]ModelEach itemExpand Update sequence — response body — steps item
updatedAtstringRequired within parentThe date and time when the sequence was last updated, in ISO 8601 format.
Format: date-time
userIdstringRequired within parentThe unique identifier of the user who owns the sequence.

Referenced models: Update sequence — response body — settings, Update sequence — response body — dependencies item, Update sequence — response body — steps item

Create sequence — request body — body engagement Triggers
FieldTypePresenceDescription and constraints
$objectRoot
numberOfClicksintegerOptionalAn integer representing the number of times links within an email must be clicked to trigger an engagement action.
Format: int32
numberOfOpensintegerOptionalAn integer representing the number of times an email must be opened to trigger an engagement action.
Format: int32
Create sequence — request body — body settings
FieldTypePresenceDescription and constraints
$objectRoot
eligibleFollowUpDaysstringRequired within parentSpecifies the days on which follow-ups are eligible to be sent. Valid values include 'EVERYDAY', 'BUSINESS_DAYS', and 'WEEKDAYS_ONLY'.
One of: BUSINESS_DAYS, EVERYDAY, WEEKDAYS_ONLY
individualTaskRemindersEnabledbooleanRequired within parentA boolean indicating whether individual task reminders are enabled.
sellingStrategystringRequired within parentDefines the selling strategy to be used. Valid values include 'LEAD_BASED' and 'ACCOUNT_BASED'.
One of: ACCOUNT_BASED, LEAD_BASED
sendWindowEndMinuteintegerRequired within parentAn integer representing the end minute of the window during which emails can be sent.
Format: int32
sendWindowStartMinuteintegerRequired within parentAn integer representing the start minute of the window during which emails can be sent.
Format: int32
taskCreationMinuteintegerRequired within parentAn integer indicating the minute at which tasks should be created.
Format: int32
taskReminderMinuteintegerRequired within parentAn integer indicating the minute at which task reminders should be sent.
Format: int32
unenrollmentSettingsModelRequired within parentExpand Create sequence — request body — body settings unenrollment Settings
useThreadedFollowUpsbooleanRequired within parentA boolean indicating whether follow-ups should be threaded.

Referenced models: Create sequence — request body — body settings unenrollment Settings

Create sequence — request body — body dependencies item
FieldTypePresenceDescription and constraints
$objectRoot
branchNumberintegerRequired within parentAn integer indicating the branch number associated with the dependency.
Format: int32
dependencyTypestringRequired within parentA string indicating the type of dependency. Valid values include 'TASK_COMPLETION' and 'MANUAL_PAUSE'.
One of: ADAPTIVE_COMPLETION, MANUAL_PAUSE, TASK_COMPLETION
reliesOnStepOrderintegerRequired within parentAn integer representing the order of the step that is relied upon by another step.
Format: int32
requiredByStepOrderintegerRequired within parentAn integer representing the order of the step that requires the dependency.
Format: int32
Create sequence — request body — body steps item
FieldTypePresenceDescription and constraints
$objectRoot
actionTypestringRequired within parentA string indicating the type of action to be performed in this step. Valid values include 'EMAIL', 'TASK', and 'FINISH_ENROLLMENT'.
One of: ADAPTIVE_CONTAINER, EMAIL, FINISH_ENROLLMENT, TASK
branchNumberintegerRequired within parentAn integer representing the branch number of this step, used for branching logic in sequences.
Format: int32
delayMillisintegerRequired within parentAn integer representing the delay in milliseconds before this step is executed.
Format: int64
delayMillisMaxintegerOptionalAn integer specifying the maximum delay in milliseconds for this step.
Format: int64
delayMillisMinintegerOptionalAn integer specifying the minimum delay in milliseconds for this step.
Format: int64
dynamicbooleanRequired within parentA boolean indicating whether the step is dynamic, allowing for conditional execution based on certain criteria.
emailPatternModelOptionalExpand Create sequence — request body — body steps item email Pattern
stepOrderintegerRequired within parentAn integer indicating the order of the step within the sequence.
Format: int32
taskPatternModelOptionalExpand Create sequence — request body — body steps item task Pattern
variantsarrayRequired within parentAn array of PublicSequenceStepVariantRequest objects, each representing a variant of this step.
variants[]ModelEach itemExpand Create sequence — request body — body steps item variants item

Referenced models: Create sequence — request body — body steps item email Pattern, Create sequence — request body — body steps item variants item, Create sequence — request body — body steps item task Pattern

SDK function policy ID: hubspot.sequences_create_sequence. Catalog operation: sequences_create_sequence. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["automation.sequences.create", "automation.sequences.edit", "automation.sequences.read"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.