APIs & Integrations

StefanDimitrov
Member

Workflow extension issue

Hi,

 

I have a question regarding the workflow extension api. I hit this api endpoint https://api.hubapi.com/automationextensions/v2/definitions?hapikey={apiKey}&applicationId={appId} with correct parameters. The result is a workflow extension action which I can add to workflows but instead of one field I get duplicate fields. The json body is similar to one of the samples in the documentation.

{
	"integrationAppId": 1162896,
	"extensionName": "Create New Appointment",
	"webhookUrl": "https://api.myservice.com/hubspot/new-appointment",
	"fieldMetadata": [{
		"label": "Appointment Summary",
		"key": "appointment_title",
		"fieldType": "TEXT",
		"values": [{
			"type": "STATIC_VALUE",
			"allowsMergeTags": true
		}]
	}]
}

 

Thanks.

 
9 Replies 9
Willson
HubSpot Employee
HubSpot Employee

Workflow extension issue

Hi @StefanDimitrov 

 

Would you be able to provide the request body you're working with where you're seeing this issue so that we can take a look into this from our side? 

 

I've gone ahead and tested this on my end using the exact code you've linked via the docs found here:

https://developers.hubspot.com/docs/methods/workflow-extensions/workflow-extensions-overview

 

This was done by using the following endpoint:

Create a new Definition -

POST https://api.hubapi.com/automationextensions/v1/definitions?hapikey=<<hapikey>>&applicationId=<<app ID>>

The hapikey and application_id can be retrieved from your App via your Developer Portal. It's important to remember that this is your Developer Hapikey, info of which can be found here.

 

Once this was submitted, I received a successful response and the extension was added to my portal where this App had been installed. 

 

If you've mirrored this process but still encountered the duplication issue, please do pass along the body of the request and the Portal where this duplication is being seen and we can take a look for you.

 

I hope this helps! 

 

 

 

Product Manager @ HubSpot
StefanDimitrov
Member

Workflow extension issue

I make a post request to this endpoint

https://api.hubapi.com/automationextensions/v1/definitions?hapikey=xxxx&applicationId=xxxx

and my request json body is

{
	"integrationAppId": xxxx,
	"extensionName": "Port CV 15",
	"webhookUrl": "https://sdimitrov.devsmm.com/home/updatecontactasync",
	"fieldMetadata": [{
		"label": "Google drive folder:",
		"key": "GoogleDriveCvFolder",
		"fieldType": "TEXT",
		"values": [{
			"type": "STATIC_VALUE"
		}]
	}]
}

Thanks.

0 Upvotes
Willson
HubSpot Employee
HubSpot Employee

Workflow extension issue

Hi @StefanDimitrov 

 

Thanks for this data - I can see that you posted this with your Hapikey included, in order to protect your account, you will want to remove this when posting to the forum as this is publically accessible. I've gone ahead and removed that for you now. 

 

In relation to the issue itself, i've tested this out for you now in my portal and can see that the extension is created when checking on a workflow action in my portal. 

 

Are you currently referring to the duplication seen in the request response? As I tested this on my side using your code, I was returned the following:

   "id": xxxx,
    "latestVersion": 0,
    "integrationAppId": xxxx,
    "extensionName": "Port CV 15",
    "version": 0,
    "webhookUrl": "https://mywebhookURL.com/webhook",
    "dataUrl": null,
    "fieldMetadata": [
        {
            "key": "GoogleDriveCvFolder",
            "label": "Google drive folder:",
            "values": [
                {
                    "allowsMergeTags": null,
                    "type": "STATIC_VALUE",
                    "options": []
                }
            ],
            "fieldType": "TEXT",
            "required": true
        },
        {
            "key": "GoogleDriveCvFolder",
            "label": "Google drive folder:",
            "values": [
                {
                    "allowsMergeTags": null,
                    "type": "STATIC_VALUE",
                    "options": []
                }
            ],
            "fieldType": "TEXT",
            "required": true
        }
    ],
    "lambdas": {}
}

Is this duplication of the metadata in the response what you're referring to? 

 

Thanks

Product Manager @ HubSpot
0 Upvotes
StefanDimitrov
Member

Workflow extension issue

Thanks for removing the credentials. I am aware I should not post any sensitive data publicly but I was not sure if you were asking for them. My bad.

Yes the metadata is duplicated and reflected in the UI like this.

workfowExtensionDuplicateFields.JPG

0 Upvotes
Willson
HubSpot Employee
HubSpot Employee

Workflow extension issue

Hi @StefanDimitrov 

 

Thanks for the confirmation here! Would you be able to remove this version that you've created via the following endpoint:

 

DELETE https://api.hubapi.com/automationextensions/v1/definitions/<<definition id>>?hapikey=<<hapikey>>&applicationId=<<app ID>>

 

Once this is done, if you could attempt to recreate this with the following code (You'll need to fill in the details where i've removed some content):

{
    "integrationAppId": YOUR APP ID,
    "extensionName": "Port CV 15",
	"webhookUrl": "YOUR WEBHOOK URL",
	"fieldMetadata": [{
		"label": "Google drive folder:",
		"key": "GoogleDriveCvFolder",
		"fieldType": "TEXT",
		"values": [{
			"type": "STATIC_VALUE"
		}]
	}]
}

Once this is done, if we can verify the end result again, we can proceed from there. 

 

Thanks!

Product Manager @ HubSpot
0 Upvotes
StefanDimitrov
Member

Workflow extension issue

For some reason I am unable to delete any version. They are marked as deleted but still when I try to create an action with the same name I get an error that it already exists. Also it is not removed from the UI.

0 Upvotes
Willson
HubSpot Employee
HubSpot Employee

Workflow extension issue

Hi @StefanDimitrov 

 

Just wanna let you know that this issue should now be resolved, let me know if you have any questions.

 

Thanks

Product Manager @ HubSpot
0 Upvotes
avichopra
Contributor | Platinum Partner
Contributor | Platinum Partner

Workflow extension issue

Hello hubspot moderator,

The isssue is not resolved. We are trying the same and getting the fieldMetaData getting duplicated. Can you tell how do we resolve that issue? We are following the exact steps in the document.

0 Upvotes
Willson
HubSpot Employee
HubSpot Employee

Workflow extension issue

Hi @StefanDimitrov 

 

Would you be able to message me directly with your Portal ID for where you're seeing this extension still being shown and the latest request body used to delete the extension? 

 

Thanks

Product Manager @ HubSpot
0 Upvotes