> For the complete documentation index, see [llms.txt](https://docs.integry.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.integry.ai/embedded-ui/add-integry-apps-to-an-existing-marketplace.md).

# Add Integry Apps to an Existing Marketplace

In this guide, we will use the [Integry.JS SDK](/apis-and-sdks/js-sdk-reference.md) to add an app to an existing integrations marketplace in your app so your users can connect to that app and setup/run integrations with that app.

Before you proceed, please [sign up](https://app.integry.io/accounts/register/v3/signup/?product=functions) for a free trial (if you haven't).

## Set up the SDK

Follow the steps [here](/apis-and-sdks/js-sdk-reference.md#setting-up).

## Add an app card in your marketplace

Add a card/button for each app powered by Integry. Your users will click that card/button to access the onwards experience powered by Integry.

## Show the Integry app page

Call the [`showApp()`](/apis-and-sdks/js-sdk-reference.md#show-flows-coming-soon) method when a user clicks the card/button.

<pre class="language-javascript"><code class="lang-javascript"><strong>integry.showApp(
</strong><strong>  "hubspot"
</strong><strong>  IntegryJS.RenderModes.INLINE,
</strong>  "marketplace-container"
<strong>).then(() => {
</strong>  console.log("Showing Hubspot Flows!");
}).catch((error) => {
  console.error("Failed to launch Slack:", error);
});
</code></pre>

Your users will be asked to connect the app (if they haven't already) or select a connected account (if they have connected multiple accounts). They will then be able to setup/run integrations of Flows with that app.

## Listen to events

### App connected / disconnected

Subscribe to the `app-connected` and `app-disconnected` events that are respectively fired when the user connects or disconnects an app to be able to show the connection status on the card (like it's shown in the [Integry Apps Marketplace](/embedded-ui/embed-integry-apps-marketplace.md)).

```javascript
integry.eventEmitter.on('app-connected', (data) => {
    console.log("User connected:" + data.name);
});
```

### Integration created

If you are going to send data from your app to another app, you will need to capture (and store) the **unique callback URL** for the user's integration so you can trigger it from your app.

Subscribe to the `integration-created` event and get the `callbackURL`. This event will fire after your user creates an integration. It will not fire if they edit an existing integration.

```javascript
integry.eventEmitter.on('integration-created', (data) => {
    console.log("Callback URL: " + data.callbackUrl);
});
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.integry.ai/embedded-ui/add-integry-apps-to-an-existing-marketplace.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
