I have a iframe to embed in hubspot as UI Extension. But for some reason I need to pass the iframe's internal document to an object. But <iframe> element is not allowed in UI Extension and with iframe-Modal I have no control of the iframe element.
Worse ist, I cannot get the <iframe> element using document.getElementById/document.querySelector. I got the error:
By design, there's limited flexibility and strong security built into HubSpot's UI Extensions framework. I imagine the "Refused to create a worker ..." issue you're experiencing is related to a HubSpot Content Security Policy directive -- there's a semi-related community post you can check out here.
In saying that, you should be able to open an iframe in a modal by following this documentation (see the "Open an iframe in a modal" section).
I hope that proves helpful. Please let me know if you have any follow-up questions.
All the best,
Zach
--
Zach Klein HubSpot Integrations & App Developer Meanjin / Brisbane, Australia
Thank you for the reply. I can open an iframe in a modal now.
But we want to integrate the a Web-App as an iframe into the HubSpot UI extension. However, we need to use the iframe modal from HubSpot. But we don't have access to the iframe modal from HubSpot. We need to pass the internal document from iframe to the App.
We would now like to know if there are other ways than UI Extension to integrate a dynamic iframe into HubSpot as an iframe instead of a static page. This iframe must be integrated into the CRM context.
Thank you again 🙂 Do I need the Enterprise subscription to use the serverless functions? Because I have tried the private apps before. But I always get the error
[ERROR] Couldn't create a React extension with your file `/app/extensions/multi-step-flow-example-card.json` because you don't have access to this beta. To learn more and sign up for the beta, visit https://app.hubspot.com/l/whats-new/all?update=13899236
When I try to open the link, nothing is found.
So is it due to my incorrect operation, or can I not use this feature at all?