Create App to be an Action in Workflow

Hello,

I`m looking for instructions or a tutorial that explains in details how to create an App that can be used as Action in a workflow. I need something like “Asana” app, where I can create a task as a destiny of a workflow. I have expertise in programming and API integrations, but I need a step by step instruction or something else.

Thanks for any help

Hey @Mhokano

I believe the best resource for you to work with would be our Workflow Extensions API Overview. This document will detail the necessary steps involved with creating your own Workflow extension.

I hope this helps!

Hi @Willlson,

I followed the same documentation but I am getting 404 error.

I am using this code

<?php

$url = ‘https://api.hubapi.com/automationextensions/v1/definitions?hapikey=eu1-e63e-276d-46f7-8079-47bbdc7b5675&applicationId=407547’;
$data = ‘{
“integrationAppId”:407547,
“extensionName”: “Kaleyra SMS1”,
“webhookUrl”: “https://kaleyra-webhooks.free.beeceptor.com”,
“dataUrl”:“https://mocki.io/v1/86500b02-73e6-4c04-abad-d1fc4f926ce9”,
“fieldMetadata”: [
{
“label”: “Email”,
“key”: “email”,
“fieldType”: “TEXT”,
“values”: [
{
“type”: “STATIC_VALUE”,
“allowsMergeTags”: true
}
]
},
{
“label”: “Mobile Number”,
“key”: “phone_number”,
“fieldType”: “TEXT”,
“values”: [
{
“type”: “STATIC_VALUE”,
“allowsMergeTags”: true
}
]
},
{
“label”: “DLT ID”,
“key”: “DLT_key”,
“fieldType”: “TEXT”,
“values”: [
{
“type”: “STATIC_VALUE”,
“allowsMergeTags”: true
}
]
},
{
“label”: “Message”,
“key”: “message”,
“fieldType”: “TEXTAREA”,
“values”: [
{
“type”: “STATIC_VALUE”,
“allowsMergeTags”: true
}
]
}
]
}’;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_ENCODING, “”);
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

$headers = array();
$headers[] = ‘Content-Type: application/json’;
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);

if (curl_errno($ch))
{
echo ‘Error:’ . curl_error($ch);
}

curl_close($ch);

echo $result;

Is there any error in this code?

Plese correct me if I am doing wrong.

Thanks for the help.

Hi @Willson ,

The API for creating custom workflow action is not working . It is a kind of bug in the HUBSPOT.

Our team which is working on the integration app for the hubspot is not able to create a custom workflow action. We have tried many times but every we are getting the same error “HTTP 404 error Resource not found”.

Can you please pass this message to the hubspot developer team?

It will be a big help.

We are using php code for the workflow action creation:

<?php

$url = ‘https://api.hubapi.com/automationextensions/v1/definitions?hapikey=eu1-e63e-276d-46f7-8079-47bbdc7b5…’;
$data = ‘{
“integrationAppId”:407547,
“extensionName”: “Kaleyra SMS1”,
“webhookUrl”: “https://kaleyra-webhooks.free.beeceptor.com”,
“dataUrl”:“https://mocki.io/v1/86500b02-73e6-4c04-abad-d1fc4f926ce9”,
“fieldMetadata”: [
{
“label”: “Email”,
“key”: “email”,
“fieldType”: “TEXT”,
“values”: [
{
“type”: “STATIC_VALUE”,
“allowsMergeTags”: true
}
]
},
{
“label”: “Mobile Number”,
“key”: “phone_number”,
“fieldType”: “TEXT”,
“values”: [
{
“type”: “STATIC_VALUE”,
“allowsMergeTags”: true
}
]
},
{
“label”: “DLT ID”,
“key”: “DLT_key”,
“fieldType”: “TEXT”,
“values”: [
{
“type”: “STATIC_VALUE”,
“allowsMergeTags”: true
}
]
},
{
“label”: “Message”,
“key”: “message”,
“fieldType”: “TEXTAREA”,
“values”: [
{
“type”: “STATIC_VALUE”,
“allowsMergeTags”: true
}
]
}
]
}’;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_ENCODING, “”);
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

$headers = array();
$headers[] = ‘Content-Type: application/json’;
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);

if (curl_errno($ch))
{
echo ‘Error:’ . curl_error($ch);
}

curl_close($ch);

echo $result;

Thanks for the help

Hey @rajnishpatel ,

I’d suggest you regenerate your Developer Key in your Developer Portal as you’ve posted this on a public forum. We must stress that you should never share this key in order to protect your Portals, whether it be a normal HubSpot Portal or a Developer Portal.

With that said, this issue looks to be related to an issue we’re currently digging into with the API keys. I’d ask that you contact Support directly so that we can triage this issue appropriately for you. If you’d like, you can reference this thread so that the Support reps are aware that this is an issue being looked into.

Many thanks,

Matthew