hubspothubspot-crm

Hubspot can not create workflow extension


I had create my workflow extension like this sample: https://developers.hubspot.com/docs/methods/workflow-extensions/workflow-extensions-overview

My Request: https://api.hubapi.com/automationextensions/v1/definitions?hapikey=9eaca983-wewerwee-1232-bc56-aqwe231231&applicationId=181313

With content:

{
    "integrationAppId": 181313,
    "extensionName": "sss_v4",
    "webhookUrl": "https://webhook.site/83dfb75e-2fa3-4ae7-8c98-7461305b0b03",
    "fieldMetadata": [
        {
            "label": "Appointment Summary",
            "key": "appointment_title",
            "fieldType": "TEXT",
            "values": [
                {
                    "type": "STATIC_VALUE",
                    "allowsMergeTags": true
                }
            ]
        },
        {
            "label": "Requested Appointment Date",
            "key": "appointment_date",
            "fieldType": "DATE",
            "values": [
                {
                    "type": "OBJECT_PROPERTY"
                }
            ]
        },
        {
            "label": "Appointment Notes",
            "key": "appointment_notes",
            "fieldType": "TEXTAREA",
            "values": [
                {
                    "type": "STATIC_VALUE",
                    "allowsMergeTags": true
                }
            ]
        }
    ]
}

The result is:

{
    "id": 283,
    "latestVersion": 0,
    "integrationAppId": 181313,
    "extensionName": "sss_v4",
    "version": 0,
    "webhookUrl": "https://webhook.site/83dfb75e-2fa3-4ae7-8c98-7461305b0b03",
    "dataUrl": null,
    "fieldMetadata": [
        {
            "key": "appointment_title",
            "label": "Appointment Summary",
            "values": [
                {
                    "allowsMergeTags": true,
                    "type": "STATIC_VALUE",
                    "options": []
                }
            ],
            "fieldType": "TEXT",
            "required": true
        },
        {
            "key": "appointment_date",
            "label": "Requested Appointment Date",
            "values": [
                {
                    "type": "OBJECT_PROPERTY"
                }
            ],
            "fieldType": "DATE",
            "required": true
        },
        {
            "key": "appointment_notes",
            "label": "Appointment Notes",
            "values": [
                {
                    "allowsMergeTags": true,
                    "type": "STATIC_VALUE",
                    "options": []
                }
            ],
            "fieldType": "TEXTAREA",
            "required": true
        },
        {
            "key": "appointment_title",
            "label": "Appointment Summary",
            "values": [
                {
                    "allowsMergeTags": true,
                    "type": "STATIC_VALUE",
                    "options": []
                }
            ],
            "fieldType": "TEXT",
            "required": true
        },
        {
            "key": "appointment_date",
            "label": "Requested Appointment Date",
            "values": [
                {
                    "type": "OBJECT_PROPERTY"
                }
            ],
            "fieldType": "DATE",
            "required": true
        },
        {
            "key": "appointment_notes",
            "label": "Appointment Notes",
            "values": [
                {
                    "allowsMergeTags": true,
                    "type": "STATIC_VALUE",
                    "options": []
                }
            ],
            "fieldType": "TEXTAREA",
            "required": true
        }
    ],
    "lambdas": {}
}

But when i go to application i can nut see any extension in workflow with the name i was named.

Please you help me solve this .


Solution

  • I also faced the same issue, As HubSpot Workflow Extensions is a newly introduced feature after lot of R&D I have got to know some of these points

    To create a HubSpot Workflow Extension we have to create an App, As you already created the app (from the above fields you given) you App id will be "181313"

    After creating the app we need to install this in our Developer Account

    This is your App ID: 181313 and you need to install that app in whatever the Developer account you are using. You can check how to install app in HubSpot Developer account from here How to install an app in HubSpot

    We need an OAuth Access token to install the app, we can create OAuth access token as mentioned in this document here Creating OAuth Access Token The URL mentioned in this document will return a access code, we need our Client ID to initiate OAuth authentication

    After you install your app you can find your app in Integrations >> Apps

    enter image description here

    Now we have to create the workflow extension by using Workflow extensions API, To know how to create please check this link Creating HubSpot Workflow Extensions

    After creating the Extension we can choose your extension on "Choose an action" menu. I have created a three sample extensions you can check these extensions in the below image

    enter image description here

    Based on the business logic we can create as many extensions as we want. Extensions trigger a web hook on a particular action which we give on creating the Workflow. We can make our custom extension to return a static data or we can append any contact property to it

    For more reference check these links: HubSpot Workflow Extensions