# How to create workflow with Custom workflow action?

**URL:** <https://community.hubspot.com/t/how-to-create-workflow-with-custom-workflow-action/121175>\
**Category:** APIs & Integrations\
**Tags:** workflows\
**Created:** [November 22, 2024, 11:11am UTC](https://community.hubspot.com/t/how-to-create-workflow-with-custom-workflow-action/121175 "2024-11-22T11:11:41Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![MichaelMa](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@MichaelMa](https://community.hubspot.com/u/MichaelMa)\
**Post date:** [September 17, 2025, 1:50pm UTC](https://community.hubspot.com/t/how-to-create-workflow-with-custom-workflow-action/121175/9 "2025-09-17T13:50:45Z")

</div>

If you already have the workflow created, easiest way is to just use a GET on [https://api.hubspot.com/automation/v4/flows/YOUR\_WORKFLOW\_ID](https://api.hubspot.com/automation/v4/flows/YOUR_WORKFLOW_ID) to get the workflow data and copy your actions data (or everything if you really wanted).

It sounds like you’re trying to recreate a Webhook action. The basic structure for a Webhook action is:

```lia-code-sample
 {
 "actionId": "5",
 "method": "POST",
 "webhookUrl": "https://endpoint here",
 "queryParams": [],
 "authSettings": {
 "appId": 1234567890,
 "type": "SIGNATURE"
 },
 "type": "WEBHOOK"
 }

```

Unless you mean you want to create a Custom Code Action:

```lia-code-sample
 {
 "actionId": "4",
 "secretNames": [],
 "sourceCode": "exports.main = async (event, callback) => {\n / *****\n Use inputs to get data from any action in your workflow and use it in your code instead of having to use the HubSpot API.\n***** /\n const email = event.inputFields['email'];\n / *****\n Use the callback function to output data that can be used in later actions in your workflow.\n***** /\n callback({\n outputFields: {\n email: email\n }\n });\n}",
 "runtime": "NODE20X",
 "inputFields": [],
 "outputFields": [],
 "type": "CUSTOM_CODE"
 }

```

But it’s literally easier to just build the workflow or actions you want in Hubspot, then use a GET request on it and copy the action data.

---

_[View the full topic](https://community.hubspot.com/t/how-to-create-workflow-with-custom-workflow-action/121175)._
