When attempting to update an existing custom workflow action’s specifically changing the `actionUrl` field using the PATCH method, but the API returns a 500 Internal Server Error.
For ActionUrl, I am using ngrok pointing to my local pc, so i am sure that it works.
Here’s the sample body
{
"id": "30920351",
"actionUrl": "{{actionUrl}}/api/send-sms",
"integrationAppId": {{applicationId}},
"published": true,
"extensionName": "SMS Local Testing V1",
"httpHeaders": {
"Authorization": "Bearer {{auth_token}}"
},
"version": 8,
"latestVersion": 8.1,
"objectTypes": ["CONTACT", "DEAL"],
"inputFields": [
{
"typeDefinition": {
"name": "widgetPhone",
"type": "string",
"fieldType": "text"
},
"supportedValueTypes": ["OBJECT_PROPERTY"],
"isRequired": true
},
{
"typeDefinition": {
"name": "smsMessage",
"type": "string",
"fieldType": "textarea"
},
"supportedValueTypes": ["STATIC_VALUE"],
"isRequired": true
}
],
"outputFields": [
{
"typeDefinition": {
"name": "status",
"type": "bool",
"fieldType": "booleancheckbox"
},
"supportedValueTypes": [
"STATIC_VALUE"
]
}
],
"labels": {
"en": {
"inputFieldLabels": {
"widgetPhone": "Enter phone number",
"smsMessage": "SMS Message"
},
"outputFieldLabels": {
"status": "Success"
},
"actionName": "SMS Local Testing V1",
"actionDescription": "This custom workflow is for testing only",
"actionCardContent": "SMS Local Testing V1"
}
},
"functions": [
{
"functionType": "PRE_ACTION_EXECUTION",
"functionSource": "exports.main = (event, callback) => {\n\n callback({\n \"data\": {\n \"hs_object_id\": event[\"object\"][\"objectId\"],\n \"phone\": event[\"object\"][\"widgetPhone\"] ,\n \"text\": event[\"inputFields\"][\"smsText\"] \n }\n });\n}\n"
},
{
"functionType": "POST_ACTION_EXECUTION",
"functionSource": "exports.main = (event, callback) => {\n callback({\n \"outputFields\": {\n \"status\": \"true\" ,\n \"hs_execution_state\": \"SUCCESS\" \n }\n });\n}\n"
}
]
}
