guides

ByteChef Embedded, Part 18: What's New in the Embedded SDK 0.4.0

ByteChef Embedded, Part 18: What's New in the Embedded SDK 0.4.0
7 min read
Ivica Čardić

TL;DR: @bytechef/embedded 0.4.0 adds AutomationHub and IntegrationMarketplace, so a whole automation catalog or integrations page is now one component in your app. The Connect dialog gets a dark mode, and a refreshed token reaches an open page without reloading it.

Parts eleven through thirteen showed ByteChef's embedded SDK one piece at a time. This part covers what's new in 0.4.0 and how the pieces fit together in a real app.

What's New

  • AutomationHub: the end-user Automation Hub, with its template catalog, Connections tab and builder, in one component.
  • IntegrationMarketplace: the Integration Marketplace catalog in one component, with the Connect dialog opening right in your page.
  • Dark mode for the Connect dialog, so it matches a dark app.
  • Live updates: change a setting or refresh the user's token, and the embedded page picks it up without a reload.
  • Cleaner styles: the Connect dialog no longer changes the look of the rest of your page.

Getting Started

Install the package:

npm install @bytechef/embedded@0.4.0

It works with React 19. Every embedded piece needs the same three things:

  • baseUrl: your ByteChef instance, ByteChef Cloud or your own server.
  • environment: DEVELOPMENT, STAGING or PRODUCTION, which decides the integrations and connections the user sees.
  • jwtToken: a token your backend creates for the signed-in user, as described in part one.

The Automation Hub in One Component

AutomationHub gives your users the full hub from part twelve: 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'}}
/>

In the sample app, that one tag is the entire Automation Hub page:

The embedded Automation Hub in the sample app, with the Automations tab open and a grid of automation cards

You decide which tabs appear, whether users can create blank automations or edit templates, which components the builder offers, and whether the catalog starts as a grid or a list. Everything users do inside the hub is saved by ByteChef, so there's nothing for your app to store. If you built your own catalog page before, this may replace it.

The Integration Marketplace in One Component

IntegrationMarketplace is the catalog from part thirteen: a card for each integration you offer, with Connect or Connected on it.

import {IntegrationMarketplace} from '@bytechef/embedded';

<IntegrationMarketplace
    baseUrl={BYTECHEF_APP_BASE_URL}
    environment={BYTECHEF_ENVIRONMENT}
    jwtToken={jwtToken}
    onConnectDialogClose={() => refreshConnectionCount()}
    theme={{mode: 'dark'}}
/>

Here's the sample's marketplace page, with every integration already connected:

The embedded Integration Marketplace in the sample app, with Slack and Gmail cards marked Connected

When a user clicks Connect, the Connect dialog opens in your page. Once it closes, the card updates to Connected and your onConnectDialogClose runs, a good place to refresh anything in your app that counts connections.

The Connect Dialog, Now With Dark Mode

The useConnectDialog hook from part one still opens ByteChef's Connect dialog for one integration. It now takes a mode option:

const {openDialog} = useConnectDialog({
    baseUrl: 'https://app.bytechef.io',
    environment: 'PRODUCTION',
    integrationId: String(integration.id),
    jwtToken,
    mode: 'dark',
    onClose: () => refreshIntegrations(),
});

A user who isn't connected yet sees the connection form, or an Authorize button for apps that sign in with OAuth2. A connected user sees the integration's workflows and MCP tools, each with an on/off switch, and a Disconnect button:

The Connect dialog for a connected Gmail integration, showing the Workflows and Tools tabs, a workflow toggle and the Disconnect button

The Workflow Builder

EmbeddedWorkflowBuilder, from part eleven, puts ByteChef's editor for one workflow in your app:

<EmbeddedWorkflowBuilder
    baseUrl={BYTECHEF_APP_BASE_URL}
    connectionDialogAllowed={true}
    environment={BYTECHEF_ENVIRONMENT}
    jwtToken={jwtToken}
    workflowUuid={workflowUuid}
/>
The embedded workflow builder inside the sample app, showing a Gmail trigger, a condition and Slack and Gmail actions next to the sample app sidebar

With connectionDialogAllowed turned off, users can only pick from the connections they already have and the shared connections you set up for them.

Matching Your Look

The Automation Hub and the Integration Marketplace take a theme: dark or light mode, your brand color, font, corner radius and background colors. The Connect dialog takes just a light or dark mode. If your app has a dark theme, pass the same mode to both, so the dialog matches the page it opens over:

const mode = isDarkTheme ? 'dark' : 'light';

<IntegrationMarketplace baseUrl={baseUrl} environment={environment} jwtToken={jwtToken} theme={{mode}} />;

Refreshing Tokens Without a Reload

This is the change you'll notice most. Tokens should expire after a short time, but users often keep the hub or the builder open longer than that. In 0.3.0, giving the page a new token meant reloading it in front of the user.

In 0.4.0, you just pass the new token. The embedded page switches to it and keeps going, with no reload. The same goes for any other setting you change, like the tabs or the theme. A simple way to keep the token fresh is to check it every so often from a client component and hand the latest one to the component. The embedded sample app has a helper that only asks your backend for a new token shortly before the old one expires.

Coming From 0.3.0?

Bump the version. If your workflow builder passed sharedConnectionIds, delete it: it never had an effect, and connections are now shared from the admin UI, as part fifteen describes. Since the Connect dialog no longer styles the rest of your page, check any page that picked up its fonts or colors by accident.

Before You Go Live

  • Pin the version, so an update is a decision you make.
  • List the exact addresses of every app that embeds ByteChef in the allowed origins, as part seventeen explains.
  • Use short-lived tokens and refresh them while the page is open.
  • Set environment on every component. The default is PRODUCTION, which you rarely want while developing.
  • Match dark mode across the Connect dialog and the embedded pages.

What You Own, What ByteChef Owns

You own your app: the page layout, the token your backend creates, 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 what your users turn on. Your code comes down to a token endpoint, a few components and a hook.

Eighteen Parts In

Here's the series so far:

  1. Connect your users' apps (the JWT and ConnectDialog everything rests on).
  2. Act on those connected apps directly with the ComponentKit.
  3. Chat with an AI assistant that uses the ComponentKit's tools.
  4. Trigger their workflows from your product's events.
  5. Call a workflow like a synchronous API.
  6. Agent over MCP: the same tools, discovered through an open protocol.
  7. Author workflows in a builder you designed yourself.
  8. Start from a template you curated.
  9. Talk a workflow into existence with ByteChef's agent.
  10. Describe it in one sentence and get a finished workflow back.
  11. Build on ByteChef's canvas with the embedded workflow builder.
  12. Offer a catalog of automations in the Automation Hub.
  13. List your integrations in the Integration Marketplace.
  14. Map fields: your fields to theirs, chosen by the user.
  15. Share connections you set up once for everyone in an environment.
  16. Decide who sees what with permission expressions and internal-only inputs.
  17. Embed securely: frame origins, token scoping and admin gating.
  18. Ship it with the SDK at 0.4.0 (this part).

Through all eighteen, the split has stayed the same: the experience is yours, and the integration machinery behind it is ByteChef's. Part nineteen moves integrations and catalog automations from the canvas into code you deploy from your own repository.

Following along? In the embedded sample app, install @bytechef/embedded@0.4.0, open Automation Hub and Integration Marketplace, and pass theme={{mode: 'dark'}} to see both switch.

Subscribe to the ByteChef Newsletter

Get the latest guides on complex automation, AI agents, and visual workflow best practices delivered to your inbox.

Related posts