Embed apps and cells
Embed an app
To embed an entire app, click the Embed button in the bottom right of the Share dialog to copy the embed code to your clipboard. You can now paste that code into your other webpage.
To embed an app into Notion, just copy and paste the link to the published app into Notion and choose "Paste as preview" or "Paste as mention" when prompted. The first time you generate a preview in Notion, you'll be prompted to connect to Hex.
Embed a cell
Individual cells from projects can also be embedded in other websites. From the Logic View, use the Embed cell button in the cell options dialog to copy the embed code to your clipboard.
You'll be prompted to copy either an embeddable link (for officially supported tools like Notion) or embed code (for a general purpose iframe).
How do permissions work for iframe embeds?
The permissions for apps and cells embedded via iframes are the same as if that user were to open the link in a separate tab in your browser.
- If anyone with the link should be able to view the embedded resource then you'll need to toggle on the Share to web option in your project.
- If only a subset of users have permission to view then they are the only folks who'll be able to access it, so long as they are logged into Hex. Anyone else will see an "Access Denied" message.
How do permissions work for Notion link previews?
When a user pastes a link to a Hex app or cell in Notion, they will be prompted to generate a preview. That preview will be viewable by anyone who has access to the Notion page, no matter what their permissions on the Hex project are.
While this makes it convenient to share Hex projects with other users in your Notion workspace, it also effective gives all Notion users the App User role on your Hex project. As a result, only Editors or Owners of a project can generate a preview in Notion – users with Viewer or App User permissions will not be able to generate a preview. This is in line with how permissions work within Hex: Editors and above are able to share projects with additional users, but Viewers and App Users cannot.
The exception here is projects that are shared with the web: anyone with a Hex login can generate a preview for these projects.
Can I prevent users from embedding projects in Notion?
Admins can turn off the ability for users in their workspace to embed projects in Notion by heading to the Admin panel, then Security and disabling the Allow Notion Link Previews toggle.