I got error while creating workflow with custom workflow action.

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…

Hey, @KPadhiyar :waving_hand: What happens if you set your custom action definition to `“published”: true`? I ask because of this part of the documentation “custom actions are created in an unpublished state. Unpublished actions are only visible in the developer portal associated with your HubSpot application. To make a custom action visible to users, update the published flag on your action definition to true.”

@Jaycee_Lewis Thanks for the reply, But I’ve already tried with the published action which is available on HubSpot. There are any other posibilities why it’s not working?

Hey @Jaycee_Lewis , Any solution for this?