Working on a UI extension challenge and wanted to get your thoughts...
Scenario:
Need to process 30+ items through external API calls in a UI extension - each item will have 4-6 api calls
Each batch of 10 items takes ~15 seconds - for simplicity I'm using this as an example
Looking at implementing a "state continuation" pattern
Proposed approach: Have the UI extension orchestrate multiple serverless function calls, passing state forward:
UI Extension calls → Serverless processes items 1-10 → Returns state
UI Extension calls → Serverless processes items 11-20 → Returns state
UI Extension calls → Serverless processes items 21-30 → Done!
The UI maintains all state (progress, errors, etc.) and triggers sequential batches.
My questions:
Has anyone successfully implemented this pattern in a HubSpot UI extension?
Any gotchas with making multiple sequential serverless calls from the UI? Can I even trigger a serverless function using "state"?
Alternative approaches you've used for long-running processes?