# 30 second limit in workflow custom code

**URL:** <https://community.hubspot.com/t/30-second-limit-in-workflow-custom-code/51984>\
**Category:** Data Hub\
**Tags:** workflows\
**Created:** [February 22, 2022, 10:45pm UTC](https://community.hubspot.com/t/30-second-limit-in-workflow-custom-code/51984 "2022-02-22T22:45:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gjm222](https://avatars.discourse-cdn.com/v4/letter/g/7ba0ec/32.png) [@gjm222](https://community.hubspot.com/u/gjm222)\
**Post date:** [February 22, 2022, 10:45pm UTC](https://community.hubspot.com/t/30-second-limit-in-workflow-custom-code/51984/1 "2022-02-22T22:45:05Z")

</div>

I am calling a rest api using nodejs request from inside my workflow custom code. The call takes more than 30 seconds to complete. I get the below message…

#### All is not lost.

There was a network error while running your test. Please wait a minute and try reloading the page.

This limit seems to be imposed by Hubspot. Is there a way to increase this timeout limit?

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![nikodev](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/nikodev/32/44733_2.png) [@nikodev](https://community.hubspot.com/u/nikodev)\
**Post date:** [May 24, 2022, 8:01pm UTC](https://community.hubspot.com/t/30-second-limit-in-workflow-custom-code/51984/2 "2022-05-24T20:01:03Z")

</div>

Hey there @gjm222,

The time limit per action execution is actually 20 seconds and is indeed imposed by HubSpot. The below is taken from the docs on coded actions:

_Custom code actions must finish running within 20 seconds and can only use up to 128 MB of memory. Exceeding either of these limits will result in an error._

Link to the docs [HERE](https://developers.hubspot.com/docs/api/workflows/custom-code-actions).

HubSpot has not publicized a means of increasing this time limit. Coded actions are primarily meant for smaller scale operations.

---

<div class="post-metadata">

**Author:** ![PaulBevington](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@PaulBevington](https://community.hubspot.com/u/PaulBevington)\
**Post date:** [February 5, 2024, 9:54am UTC](https://community.hubspot.com/t/30-second-limit-in-workflow-custom-code/51984/3 "2024-02-05T09:54:24Z")

</div>

Has Hubspot gave any update on increasing the 20s rule? We are trying to do more enhanced API calls to better the customer liver chat experience and the 20s rule is becoming problamatic.

---

<div class="post-metadata">

**Author:** ![tjurabek](https://avatars.discourse-cdn.com/v4/letter/t/da6949/32.png) [@tjurabek](https://community.hubspot.com/u/tjurabek)\
**Post date:** [May 8, 2025, 12:28pm UTC](https://community.hubspot.com/t/30-second-limit-in-workflow-custom-code/51984/4 "2025-05-08T12:28:19Z")

</div>

Hello,  
I am also having the same problem,  
has this been resolved yet?

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [May 13, 2025, 12:20pm UTC](https://community.hubspot.com/t/30-second-limit-in-workflow-custom-code/51984/5 "2025-05-13T12:20:48Z")

</div>

Hi @tjurabek and welcome, it’s a pleasure to have you here!  
Thanks for reaching out to the HubSpot Community!  
As @nikodev mentioned, you can see on this documentation “[Custom code workflow actions](https://developers.hubspot.com/docs/reference/api/automation/custom-code-actions#limitations)” that custom code actions must finish running within 20 seconds and can only use up to 128 MB of memory. Exceeding either of these limits will result in an error.  
If you’d like to see this limit increase, I’d suggest that you share your valuable feedback via the [HubSpot Developer Feedback Tool](https://developers.hubspot.com/feedback) to see if that’s an option for the future.  
Thanks and have a great day!  
Bérangère
