No need to apologize, I surely misunderstood too ! Where is your serverless function hosted ? Amazon ? Google ?
Here's what I understand : you developped an app that adds a custom workflow action to the HubSpot portal, is that correct ?
Now you're talking about deploying a serverless function in every portal, and this is where it gets confusing. Do you want each app install to have its own action url (i.e each portal will have the custom workflow action target a separate action url) ?
If so, I don't think that this is possible, you have to provide an action url for the custom workflow action and to me this is a constant, they can't be dynamic. But maybe that's something we could get confirmation for with @dennisedson ?
If it's not possible and you absolutely want to have a serverless function per portal, then I guess you could do something like this outside of HubSpot :
-> When your app is installed by a client, automate the serverless function duplication (wherever it's hosted, there should be an API to handle that) and store in your database the url of the newly created function as well as the client portal ID.
-> Then your custom workflow action will target one unique function that will have to re-route to the right serverless function based on the portal ID.
I hope this is not too confusing and I'm correctly understanding what you are trying to achieve !
Best,
Ludwig
CTO @ Mi4 Hubspot Platinum Partner and Integration Expert
Passionate human, very curious about everything data and automation.
However, you'll note that the Workflows API currently only supports contact-based workflows.
The workflows API v3 is under development, hopefully it will fill the gaps and let you get creative with your application. In the meantime, the manual execution looks like the most viable option.
No need to apologize, I surely misunderstood too ! Where is your serverless function hosted ? Amazon ? Google ?
Here's what I understand : you developped an app that adds a custom workflow action to the HubSpot portal, is that correct ?
Now you're talking about deploying a serverless function in every portal, and this is where it gets confusing. Do you want each app install to have its own action url (i.e each portal will have the custom workflow action target a separate action url) ?
If so, I don't think that this is possible, you have to provide an action url for the custom workflow action and to me this is a constant, they can't be dynamic. But maybe that's something we could get confirmation for with @dennisedson ?
If it's not possible and you absolutely want to have a serverless function per portal, then I guess you could do something like this outside of HubSpot :
-> When your app is installed by a client, automate the serverless function duplication (wherever it's hosted, there should be an API to handle that) and store in your database the url of the newly created function as well as the client portal ID.
-> Then your custom workflow action will target one unique function that will have to re-route to the right serverless function based on the portal ID.
I hope this is not too confusing and I'm correctly understanding what you are trying to achieve !
Best,
Ludwig
CTO @ Mi4 Hubspot Platinum Partner and Integration Expert
Passionate human, very curious about everything data and automation.