# Embed Your Automation Hub

The Automation Hub embeddable widget combines these features for your end-users:

* Browse and start Automations pre-built by your team
* Customize pre-built Automations
* Manage Logs and Accounts for their Automations

As you customize the Hub options such as layout, design and automation categories (tabs), the embed code shown in the Settings page will dynamically change.

You can copy the code from the Settings page or use this example code:

```javascript
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>Appmixer Automation Hub – Minimal Demo</title>
</head>
<body>
  <div id="widget"></div>

  <script src="https://TENANT_ID.appmixer.ai/appmixer/package/appmixer.js"></script>

  <script type="module">
    const API_BASE_URL = 'https://api-TENANT_ID.appmixer.ai';
    const USERNAME = 'YOUR_USERNAME';
    const PASSWORD = 'YOUR_PASSWORD';

    const appmixer = new Appmixer({ baseUrl: API_BASE_URL, debug: true });
    const { token } = await appmixer.api.authenticateUser(USERNAME, PASSWORD);
    appmixer.set('accessToken', token);

    appmixer.ui.AutomationHub({
    el: '#widget',
    state: {
        flows: {
            layout: 'grid'
        }
    },
    options: {
        customization: {
            entryPoints: {
                templates: true,
                scratch: false
            }
        },
        header: {
            visible: true,
            tabs: {
                hidden: []
            },
            subheader: {
                visible: false
            }
        },
        flows: {
            header: {
                layout: {
                    visible: true
                }
            },
            templates: {
                header: {
                    categories: {
                        visible: false,
                        tabs: []
                    }
                }
            }
        }
    },
    l10n: {
        ui: {
            automationHub: {}
        }
    },
    theme: {
        mode: 'dark',
        variables: {
            colors: {
                surface: '#2A2A2A',
                neutral: '#FFFFFF',
                primary: '#2B75EF',
                onPrimary: '#FFFFFF',
                secondary: '#94A6D4',
                onSecondary: '#FFFFFF',
                tertiary: '#D494D0',
                onTetriary: '#FFFFFF',
                error: '#EF4444',
                warning: '#F6C20C',
                onWarning: '#FFFFFF',
                success: '#01C58D',
                onSuccess: '#FFFFFF',
                modifier: '#C558CF',
                onModifier: '#FFFFFF',
                highlighter: '#FFA500',
                separator: '#4C4C4C',
                charcoalTeal: '#2C3130',
                darkJade: '#2C4B42'
            },
            font: {
                family: '\'SF Pro Text\', \'Helvetica Neue\', \'Helvetica\', \'Arial\', sans-serif',
                familyMono: '\'SF Mono\', \'ui-monospace\', Menlo, monospace',
                weightRegular: 400,
                weightMedium: 500,
                weightSemibold: 600,
                weightBold: 700,
                size: 14
            },
            shadows: {
                level0: 'none',
                level1: 'none',
                level2: 'none',
                level3: 'none',
                level4: 'none',
                level5: 'none',
                backdrop: 'rgba(0 0 0 / 92%)',
                popover: '1px 3px 9px rgba(0 0 0 / 32%)',
                icon: 'none',
                blur: 'rgba(0 0 0 / 75%)',
                bar: 'none'
            }
        }
    }
}).open();
  </script>
</body>
</html>
```

### Authenticating your end users

[Read more about authenticating your users](/getting-started/embed.md#authenticate-your-end-users) in the dedicated documentation section.


---

# Agent Instructions: 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:

```
GET https://docs.appmixer.com/getting-started/embed-your-automation-hub.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
