Multiple Subscriptions on a Trigger (HubSpot)

Dear All;

What is the recommended way of adding multiple Trigger Subscriptions on an HubSpot Trigger or any other if there is a general way to do it ?

Using multiple HubSpot Triggers creates this self explanatory error below:
"Can’t change or clear target URL because you have active subscriptions."

Since the first Trigger Node subscribes to the target HubSpot application first, second subscription fails on re-writing that URL.

It is possible to create multiple applications on the hubspot side and creating workflows for each of them on n8n. But this means having tens of apps connected to your HubSpot account.

There is a workaround working: (@version 0.62.1)

Multiple subscriptions can be added via HubSpot interface, solution is simply adding other subscriptions after the first one is created by the n8n workflow automatically. Creating a workflow with less frequently used subscription like “contact.message”, you can keep adding multiple subscriptions to the same Hubspot app, n8n still receives the body of them too.

A Development Suggestion:

As I’ve looked to other triggers nodes of n8n, my recommendation is to create a Node for multiple subcsriptions to a single WebHook Url. Something like a combination of a trigger node and a Switch node.

This node;

  • Will subscribe to target Hubspot App for once.
  • Switch by the “subscriptionType” parameter in the incoming body of the WebHook call.
  • Enable Visual Developer to activate switch calls depending on the value, so it will add multiple output connection points to the right side of the node.

The result will be something like this or may be the multiple nodes will be visible on the edge of the box:

I am aware that this can be done easily with a WebHook and a Switch. But this is a product decision for n8n. You can consider updating the base of triggers to support this aiming to go to the “Low-Code Development Environment” more. There could be an interface to inject a JS function for the “Switch” decision behavior in the trigger box as well.

Best

Hey, @umutgokcen, as you said if you want to handle multiple subscriptions with Hubspot the best approach right now, would be to use the Webhook node and activating the events you want to receive from the Hubspot UI. The Hubspot Webhook API handles webhooks in a particularly weird way, that is the reason that you can handle multiples events with other trigger nodes but not with the Hubspot Trigger node. It’s been a while since I developed that node, just to confirm I will take another look at it to check if it can be handle in a better way.

With regard to the recommendation, I see how that can be helpful it will be taken into consideration.

If this does not answer your question simply come back to me. We are happy to help.

2 Likes

Hi @RicardoE105;

Thank you for your approach. Frankly, what did hubspot do on the Authorized Application mechanism and communication over a single Url Entry point looks OK if you consider this being a pattern named “Message Broker”. But sure this is not a true-rest approach on the other hand.

As you mention, I solved my case using a Web Hook and a Switch, shared this for the community. I do not have anything urgent.

Let me know for anything if you like to renew the node, can support you with some ideas, testing etc.

Best