--- title: "Build an app to display content in the Gong email composer" slug: "build-an-app-to-display-content-in-the-gong-email-composer" updated: 2025-07-28T16:57:37Z published: 2025-07-28T16:57:37Z canonical: "help.gong.io/build-an-app-to-display-content-in-the-gong-email-composer" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.gong.io/llms.txt > Use this file to discover all available pages before exploring further. # Build an app to display content in the Gong email composer The Gong frontend integration allows you to display your HTML content in an iFrame in Gong. To set up this application complete the following steps: 1. Ensure you have credentials to log into your Gong Sandbox 2. Submit details of the integration as described in [Create an app for Gong](/v1/docs/create-an-app-for-gong). 3. Create your app and test it. 4. Update your integration details in Gong if needed. 5. Publish the app in the Gong Collective. Your customers can then install the app on their instance of Gong, and their reps can then embed your HTML content to their emails. ## Terminology 1. Partner: a web application that would like to integrate with Gong 2. Gong user: user with credentials both in Gong and the partner’s system. 3. Gong administrator: Gong user who can set up integrations in Gong 4. Gong Public JavaScript Frontend SDK: Javascript SDK that will be published by Gong and used by the Partner application ## Set up your Gong integration Provide Gong with information on the integration. Fill in the form as described in [Create an app for Gong](https://help.gong.io/hc/en-us/articles/13944551222157-Create-an-app-for-Gong). To create a frontend integration set the following: 1. Label and image for the button that activates the integration in the composer 2. Domains: the registered domain for the partner application. All origins configured later (here and in the tenant sub domains section) must be under this domain otherwise they will be rejected. Example: partner.com, partner-integration.com 3. iframe Integration: set the toggle to on 4. Check the Email composer checkbox and provide the URL that Gong should use to launch the iframe 5. Allowed origins: a list of https origins that can be loaded inside the iframe. Any other origin will be rejected by Gong. Examples: https://recorder.partner.com, https://recorder.partner.com, https://login.partner-integration.com - The wildcard * origin is not allowed - 3rd party origins are not allowed 6. If you need to register tenant sub domains, [set up OAuth access](https://help.gong.io/hc/en-us/articles/13944551222157-Create-an-app-for-Gong) and save the `api_base_url_for_customer` string you received when calling the `generate-customer-token` endpoint so that you can provide it when calling the init function. 7. [Publish your app](https://help.gong.io/hc/en-us/articles/4423917279373-Publish-your-app): This uploads your app to the Gong Collective and customers wwill be able to install the app. This step should be done when you've tested your app and it is ready to be used. ## Create your Gong email composer app Create a web application that will run inside an iframe in the Gong application. Note: The iframe runs in sandbox mode so the following actions are allowed: - allow-forms - allow-scripts - allow-same-origin - allow-popups ### Install the Gong SDK in your app In your app, run ```plaintext import { init, GongFrontendApi } from "@gong.io/frontend-sdk"; ``` ### Building the app The app should be set up as follows: 1. When the iFrame is activated, the Partner page can authenticate the user. The iframe sandbox includes: - `allow-popups` token so that the iframe can open a new window - `allow-same-origin` token so that the iframe can access cookies for the partner domain 2. The app should run the following functions in order to display data in the email composer: 1. When ready, call the `ready()` function to notify it loaded successfully 2. Call the `close()` function to close the iframe without embedding content (e.g. the user canceled) 3. Call the `closeWithContent()` function, passing the HTML content as string to display the content in the Email composer. 3. Once the Partner page sends back content, the iframe closes. Gong sanitizes the content and embeds it in the email draft. ## Example ```plaintext
Example of how to use Gong Partner SDK to interact with Gong