Hi HubSpot Community,
I’m working on creating a Custom Workflow Action that makes an HTTP POST request to an external API. However, I’m facing issues where no requests are being sent from HubSpot to my webhook endpoint, or not reaching my server for some reason.
I’ve configured the action to point to a public testing URL provided by webhook.site for testing, and also to point my own server, but any of them worked.
I’m sharing my custom definitions below, can u help me to figure out what could be wrong?, thank you in advance!
{
"actionUrl": "https://webhook.site/#!/view/9936fc64-e469-471a-b4f7-f6a56c2469e1",
"objectTypes": ["CONTACT"],
"published": true,
"inputFields": [
{
"isRequired": true,
"typeDefinition": {
"name": "ref",
"type": "string",
"fieldType": "text"
},
"supportedValueTypes": ["OBJECT_PROPERTY"]
},
{
"isRequired": true,
"typeDefinition": {
"name": "documento",
"type": "string",
"fieldType": "text"
},
"supportedValueTypes": ["OBJECT_PROPERTY"]
},
{
"isRequired": true,
"typeDefinition": {
"name": "nombre",
"type": "string",
"fieldType": "text"
},
"supportedValueTypes": ["OBJECT_PROPERTY"]
},
{
"isRequired": true,
"typeDefinition": {
"name": "telefono",
"type": "number",
"fieldType": "number"
},
"supportedValueTypes": ["OBJECT_PROPERTY"]
},
{
"isRequired": true,
"typeDefinition": {
"name": "comentario",
"type": "string",
"fieldType": "text"
},
"supportedValueTypes": ["STATIC_VALUE"]
},
{
"isRequired": true,
"typeDefinition": {
"name": "nombreMarcador",
"type": "string",
"fieldType": "text"
},
"supportedValueTypes": ["STATIC_VALUE"]
}
],
"labels": {
"en": {
"inputFieldLabels": {
"ref": "Hubspot Record ID",
"documento": "Contact DNI",
"nombre": "Contact Name",
"telefono": "Contact Telephone",
"comentario": "Comments for the call",
"nombreMarcador": "Counter Name"
},
"actionName": "Webhook Ucontact",
"actionDescription": "This action perform an http request to ucontact webhook",
"appDisplayName": "MM Ucontact",
"actionCardContent": "This action perform an http request to ucontact webhook"
},
"es": {
"inputFieldLabels": {
"ref": "ID del contacto de hubspot",
"documento": "DNI del contacto",
"nombre": "Nombre del Contacto",
"telefono": "Teléfono del Contacto",
"comentario": "Comentarios para la llamada",
"nombreMarcador": "Nombre del marcador"
},
"actionName": "Webhook Ucontact",
"actionDescription": "Este action envia consume el Webhook de ucontact para iniciar una llamada programada",
"appDisplayName": "MM Ucontact",
"actionCardContent": "Este action envia consume el Webhook de ucontact para iniciar una llamada programada"
}
},
"functions": [
{
"functionType": "PRE_ACTION_EXECUTION",
"functionSource": "exports.main = (event, callback) => {\r\n const transformRequest = (request) => {\r\n return {\r\n webhookUrl: request.webhookUrl,\r\n httpMethod: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Accept: 'application/json'\r\n },\r\n body: JSON.stringify({\r\n ref: request.inputFields.ref,\r\n documento: request.inputFields.documento,\r\n nombre: request.inputFields.nombre,\r\n telefono: request.inputFields.telefono,\r\n comentario: request.inputFields.comentario,\r\n nombreMarcador: request.inputFields.nombreMarcador\r\n })\r\n };\r\n };\r\n\r\n callback(transformRequest(event));\r\n}"
}
]
}
