TL;DR: @bytechef/embedded 0.4.0 turns an entire automation catalog and an entire integrations page into one React component each: AutomationHub and IntegrationMarketplace. On top of that, the Connect dialog finally has a dark mode, and you can hand an open page a fresh token without reloading it.
This is part 18 of the ByteChef Embedded series. Parts 11–13 introduced the embedded SDK one piece at a time; this one is about what changed in 0.4.0 and how the pieces come together in a real app.
What's new in 0.4.0
-
AutomationHub: the end-user Automation Hub (template catalog, Connections tab and builder) as a single component. -
IntegrationMarketplace: the integrations catalog as a single component, with the Connect dialog opening inline on your page. - Dark mode for the Connect dialog, so it no longer looks out of place in a dark app.
- Live updates: change a prop or refresh the user's token and the embedded page picks it up, no reload.
- Scoped styles: the Connect dialog stops leaking its styles into the rest of your page.
Setup
npm install @bytechef/embedded@0.4.0
The SDK targets React 19. Every embedded piece needs the same three props:
-
baseUrl: your ByteChef instance, either ByteChef Cloud or self-hosted. -
environment:DEVELOPMENT,STAGINGorPRODUCTION. This decides which integrations and connections the user sees. -
jwtToken: a token your backend signs for the current user (covered in part 1).
A full Automation Hub, one tag
AutomationHub renders everything from part 12: the Automations tab with your published templates, the Connections tab, and the builder that opens when a user customizes an automation.
import {AutomationHub} from '@bytechef/embedded';
<AutomationHub
baseUrl="https://app.bytechef.io"
className="h-[800px] w-full"
environment="PRODUCTION"
jwtToken={jwtToken}
tabs={{connections: true, newWorkflow: false}}
theme={{mode: 'light', primaryColor: '#2563eb'}}
/>
That single tag is the whole Automation Hub page in the sample app:
You control which tabs show up, whether users can start blank automations or edit templates, which components the builder offers, and whether the catalog opens as a grid or a list. Everything users do inside the hub is persisted by ByteChef, so your app stores nothing. If you hand-rolled a catalog page earlier, this can likely replace it.
A full Integration Marketplace, one tag
IntegrationMarketplace is the catalog from part 13: one card per integration you offer, each showing Connect or Connected.
import {IntegrationMarketplace} from '@bytechef/embedded';
<IntegrationMarketplace
baseUrl={BYTECHEF_APP_BASE_URL}
environment={BYTECHEF_ENVIRONMENT}
jwtToken={jwtToken}
onConnectDialogClose={() => refreshConnectionCount()}
theme={{mode: 'dark'}}
/>
Here's the marketplace page in the sample app, with everything already connected:
Clicking Connect opens the Connect dialog right on your page. When it closes, the card flips to Connected and onConnectDialogClose fires, which is the natural place to refresh any connection counts in your own UI.
The Connect dialog goes dark
The useConnectDialog hook from part 1 still opens the Connect dialog for a single integration. It now accepts a mode:
const {openDialog} = useConnectDialog({
baseUrl: 'https://app.bytechef.io',
environment: 'PRODUCTION',
integrationId: String(integration.id),
jwtToken,
mode: 'dark',
onClose: () => refreshIntegrations(),
});
Users who aren't connected yet see the connection form, or an Authorize button for OAuth2 apps. Connected users see the integration's workflows and MCP tools, each with an on/off toggle, plus a Disconnect button:
The workflow builder
EmbeddedWorkflowBuilder (part 11) embeds ByteChef's editor for a single workflow:
<EmbeddedWorkflowBuilder
baseUrl={BYTECHEF_APP_BASE_URL}
connectionDialogAllowed={true}
environment={BYTECHEF_ENVIRONMENT}
jwtToken={jwtToken}
workflowUuid={workflowUuid}
/>
Set connectionDialogAllowed to false and users can only choose from connections they already have, plus the shared connections you've set up for them.
Theming
AutomationHub and IntegrationMarketplace accept a theme: light or dark mode, brand color, font, corner radius and background colors. The Connect dialog only takes a light/dark mode. If your app has a dark theme, derive both from the same value so the dialog matches the page underneath it:
const mode = isDarkTheme ? 'dark' : 'light';
<IntegrationMarketplace
baseUrl={baseUrl}
environment={environment}
jwtToken={jwtToken}
theme={{mode}}
/>;
Token refresh without a reload
This is the change you'll feel most. Tokens should be short-lived, but users often leave the hub or builder open longer than a token lives. In 0.3.0, swapping in a new token meant reloading the page in front of the user.
In 0.4.0 you just pass the new token as a prop. The embedded page switches over and keeps going. The same applies to every other prop, like tabs or theme. A simple pattern: periodically check the token from a client component and pass down the latest one. The embedded sample app includes a helper that only asks your backend for a new token shortly before the current one expires.
Upgrading from 0.3.0
- Bump the version.
- If your workflow builder passes
sharedConnectionIds, remove it. It never did anything; connections are now shared from the admin UI (part 15). - The Connect dialog no longer styles the rest of your page, so double-check any page that was accidentally inheriting its fonts or colors.
Pre-launch checklist
- [ ] Pin the SDK version so upgrades are deliberate.
- [ ] Add the exact origin of every app that embeds ByteChef to the allowed origins (part 17).
- [ ] Use short-lived tokens and refresh them while the page is open.
- [ ] Set
environmenton every component. It defaults toPRODUCTION, which you rarely want during development. - [ ] Use the same dark/light mode for the Connect dialog and the embedded pages.
Who owns what
You own your app: the layout, the token your backend issues, which pieces you show and how they look.
ByteChef owns the catalog, the marketplace, the builder, the Connect dialog and its sign-in flows, credential storage, and the engine that runs whatever your users switch on.
Your integration code boils down to a token endpoint, a few components and one hook.
The series so far
- Connect your users' apps (the JWT and ConnectDialog everything builds on)
- Act on connected apps directly with the ComponentKit
- Chat with an AI assistant that uses ComponentKit tools
- Trigger workflows from your product's events
- Call a workflow like a synchronous API
- Run an agent over MCP with the same tools
- Author workflows in a builder you designed
- Start from a curated template
- Talk a workflow into existence with ByteChef's agent
- Describe it in one sentence, get a finished workflow
- Build on ByteChef's canvas with the embedded workflow builder
- Offer an automation catalog in the Automation Hub
- List integrations in the Integration Marketplace
- Map fields, user's choice
- Share connections once per environment
- Control visibility with permission expressions and internal-only inputs
- Embed securely: frame origins, token scoping, admin gating
- Ship it with SDK 0.4.0 (you are here)
Across all eighteen parts the split hasn't changed: the experience is yours, the integration machinery is ByteChef's. Part 19 moves integrations and catalog automations off the canvas and into code you deploy from your own repo.
Try it: in the embedded sample app, install @bytechef/embedded@0.4.0, open Automation Hub and Integration Marketplace, and pass theme={{mode: 'dark'}} to watch both switch.
Originally published on the ByteChef blog.




Top comments (0)