HubSpot · JSON Structure

Custom Workflow Actions Api Action Function Structure

A serverless function associated with an action

Type: object Properties: 3 Required: 3
AnalyticsCommerceContentCRMCustomer ServiceEmail MarketingMarketingMarketing AutomationOperationsSales

ActionFunction is a JSON Structure definition published by HubSpot, describing 3 properties, of which 3 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

id functionType functionSource

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/hubspot/refs/heads/main/json-structure/custom-workflow-actions-api-action-function-structure.json",
  "name": "ActionFunction",
  "description": "A serverless function associated with an action",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier of the function",
      "example": "500123"
    },
    "functionType": {
      "type": "string",
      "enum": [
        "PRE_ACTION_EXECUTION",
        "PRE_FETCH_OPTIONS",
        "POST_FETCH_OPTIONS",
        "POST_ACTION_EXECUTION"
      ],
      "description": "The type of function",
      "example": "PRE_ACTION_EXECUTION"
    },
    "functionSource": {
      "type": "string",
      "description": "The JavaScript source code of the function",
      "example": "example-value"
    }
  },
  "required": [
    "id",
    "functionType",
    "functionSource"
  ]
}