I’m creating workflow in HubSpot using API with custom workflow action where I’ve used php code.
$workflowData = [
'enabled' => true,
'name' => 'My New Workflow',
'actions' => [
[
'type' => 'EXTENSION',
'extensionDefinitionId' => custom action id,
'extensionInstanceVersion' => 2,
'extensionDefinitionVersion' => 1,
'extensionId' => extensionId,
'actionTypeVersion' => 1,
'parameters' => [
'property_name' => 'value'
]
]
],
'type' => 'DRIP_DELAY',
'objectTypeId' => '0-1'
];
$response = Http::withToken('access_token')
->acceptJson()
->contentType('application/json')
->post('https://api.hubapi.com/automation/v3/workflows', $workflowData);
Above code give me response like:
[
"name" => "My New Workflow",
"actions" => [
[
"type" => "EXTENSION",
"extensionDefinitionId" => extensionDefinitionId,
"extensionInstanceVersion" => 2,
"extensionDefinitionVersion" => 1,
"extensionId" => extensionId,
"metadata" => [],
"actionId" => actionId,
"stepId" => stepId,
],
],
"id" => id,
"type" => "DRIP_DELAY",
"segmentCriteria" => [],
"goalCriteria" => [],
"reEnrollmentTriggerSets" => [],
"triggerSets" => [],
"enabled" => true,
"isSegmentBased" => true,
"portalId" => portalId,
"updatedAt" => 1741245866399,
"creationSource" => [
"sourceApplication" => [
"source" => "PUBLIC_API",
"integrationId" => integrationId,
],
"createdAt" => 1741245866399,
],
"updateSource" => [
"sourceApplication" => [
"source" => "PUBLIC_API",
"integrationId" => integrationId,
],
"updatedAt" => 1741245866399,
],
"validation" => [
"source" => "API",
"actionIdErrorMap" => [
[
"EXTENSION_NOT_FOUND",
],
],
"actionIdWarningMap" => [],
"actionIdInfoMap" => [],
"stepIdErrorMap" => [],
"stepIdWarningMap" => [],
"eventAnchorErrors" => [],
"errorsWithoutFrontendCounterpart" => [],
"triggerErrors" => [],
"branchErrors" => [],
"branchWarnings" => [],
"branchInfo" => [],
"triggerSetWarnings" => [],
"miscellaneousWarnings" => [],
"fatalErrors" => [],
"enrollmentWarnings" => [],
"enrollmentErrors" => [],
"miscellaneousErrors" => [],
],
]
You can see in above response I got error like:
“actionIdErrorMap” => [
[
“EXTENSION_NOT_FOUND”,
],
],
FYI: This is my local project action which is not published.
Can anyone tell me solution for this?
Thanks…