EN
Log in Start for free

Lovable integration

Add live chat to your Lovable site

Your Lovable site is live, and your visitors have questions. With Hooky, a chat bubble shows up on every page: paste a prompt into Lovable, publish, and reply from your phone.

Why add chat to a Lovable site

Lovable takes you from idea to website in an evening. But a brand-new site also means visitors who hesitate: “do you ship to Austin?”, “the form doesn’t work on my phone”, “are you free on Saturday?”. Without an easy way to ask, they leave.

The Hooky bubble gives them that way, with no account to create. You get a notification and reply from the app. And since a Lovable site is a React (Vite) app, a single tag in index.html covers every page.

Install Hooky in Lovable

  1. Create your Hooky account (free for one site) and add your site: its name and address, for example my-site.lovable.app.

  2. Copy the install prompt from Sites: it already contains your site’s key. The one below is the same, tuned for Lovable, with a sample key.

  3. Open your project in Lovable and paste the prompt into the project chat, in Build mode (Chat and Plan modes discuss or draft a plan without touching the code).

  4. Publish: the Publish button at the top right of the editor, then Publish changes if your site is already live. Until you publish, the live version has no bubble.

The prompt for Lovable

Add the Hooky chat bubble to this site, on every page. Paste this tag once in index.html, at the root of the project, right before </body>:

<script src="https://heyhooky.com/widget.js" data-site-key="SITE_PUBLIC_KEY" async></script>

Leave it as is in index.html: don’t move it into a React component and don’t add it with a useEffect. Don’t change the script URL or the data-site-key attribute, and don’t change anything else.

On a paid Lovable plan, you can check for yourself: Code tab, index.html file, the line should sit right before </body>. On the Free plan the code editor is read-only, but you can still look.

Or: connect Hooky as an MCP connector

Lovable can also talk to Hooky directly, through its MCP server. No prompt to copy: Lovable’s AI creates your Hooky site itself and adds the bubble.

  1. In your Lovable project, open Connectors, then Add custom at the top right, and choose MCP server.

  2. Paste the server address, https://api.heyhooky.com/mcp, then click Add & authorize and sign in to Hooky (or create your account, it’s free for one site).

  3. Write in the project chat, in Build mode: “Create my site in Hooky with this project’s address, then add its chat bubble to index.html, right before </body>.” Then Publish changes.

The connector only serves Lovable’s chat while you build: your published site doesn’t need it, the bubble lives in its tag. You can also ask Lovable to turn on your site’s AI agent (Creator and Studio plans) or to sum up your latest conversations.

For Lovable workspace admins: the Hooky connector

The MCP connector is personal and only serves the chat. If you are an admin or owner of a Lovable workspace, you can also create a custom “app + chat” connector to Hooky’s API there. Two differences: it is offered to the whole workspace team (handy for an agency building its clients’ sites), and apps built in the workspace can call the API once published, for example to show the latest conversations or stats in a team-only dashboard. Lovable keeps the key on its side: it appears neither in the chat nor in the project code. The connector is only visible in that workspace.

The bubble itself needs no connector: it stays a tag in index.html. These steps follow Lovable’s docs on custom connectors; labels may shift from one version to the next.

  1. Open Connectors, then Add custom at the top right, and choose Custom connector.

  2. Details:

    • Display name: Hooky (the internal ID is derived from it and can’t be changed later);
    • Short description: “Live chat and AI agent for your sites”;
    • Description: “Create Hooky sites, get the bubble’s install tag, set its appearance and the AI agent, read conversations and stats.”;
    • Logo: download the square icon https://heyhooky.com/assets/icon-512.png (512 × 512 px), then upload it with Upload logo;
    • Category: Support;
    • Documentation URL: https://heyhooky.com/en/docs/.
  3. Authentication:

    • method Bearer token, Credential label: “Hooky API key (hka_…)”;
    • API base URL: https://api.heyhooky.com;
    • Test request: Method GET, Path /v1/account (200 with a valid key, 401 otherwise).

    You don’t enter any key in this form: each person gives theirs when connecting.

  4. Agent knowledge: Name “Hooky API”, Description “Hooky’s API routes and the pitfalls to avoid”, and in Content, paste the whole text of https://heyhooky.com/integrations/lovable/hooky-connector.md (no secrets in it). Then Create.

  5. Connect it: in Hooky, open Developers and create a key just for Lovable. In Lovable, find Hooky in the connector catalog, click Connect and paste the key. Under Sharing, the connection is private by default: share it with the workspace only if the whole team may access your Hooky account, since a key opens the whole account.

Then, in a project’s chat, in Build mode:

A sentence for Lovable’s chat

With the Hooky connector, create a Hooky site for this project’s published address, then paste its install tag into index.html, right before </body>. Also add a team-only page, behind sign-in, that lists the latest Hooky conversations. Never put the API key in browser code.

If a field has another name on your side, keep the same values: Bearer token, https://api.heyhooky.com, GET /v1/account. To cut access at any time, revoke the key in Developers, in Hooky.

Check that the bubble shows up

Open your published address (my-site.lovable.app or your domain) in a new tab and reload. The bubble sits at the bottom of the screen, on the right by default. Send yourself a first message: it lands in Messages right away.

Nothing there? In this order:

  • you did click Publish changes after the change;
  • the address you are testing is in the site’s allowed addresses in Hooky (as soon as there is one, the bubble stays hidden elsewhere);
  • the tag is intact, with the right key (ask Lovable to show you the line).

Your domain and the lovable.app address

Lovable first publishes your site on a lovable.app address, then you connect your own domain. Add both to the site in Hooky: conversations and stats stay in one place, and the bubble works on both without reinstalling anything. No need to add www.: example.com also covers www.example.com.

Reply to your visitors

Messages from all your sites land in a single inbox, in the iPhone, iPad, Mac and Android app or the web dashboard. A notification lets you know. Visitors can send you photos or a PDF (a screenshot of the bug, say), and if one of them leaves before you reply but left an email address, your reply follows them by email, with a link to pick the conversation back up.

Want more? Ask Lovable to count your signups or orders with Hooky.track too: the prompt is waiting in the Stats tab, and everything is in the docs.

Frequently asked questions

Does the bubble show in Lovable’s editor preview?

The editor preview runs on a development address. As long as you haven’t declared any address in Hooky, the bubble shows everywhere; once you declare some, it only appears on those. Simplest: test on your published address.

Lovable put the tag somewhere other than index.html

It happens: an AI likes to “tidy” code into a component. Just tell it: “Put the Hooky tag back as is in index.html, right before </body>, and remove it from the component.” Then publish again.

Do I need a paid Lovable plan?

Not for Hooky: the prompt goes through the project chat. You only need to be able to publish your site. A custom domain depends on your Lovable plan.

I have several Lovable sites

Create a site in Hooky for each one: every prompt has its own key. The Free plan covers one site, Creator ten and Studio fifty, and they all land in the same inbox.

Other tools

Your visitors have questions. Answer them from wherever you are.

Free for one site, installed with one prompt. Then just keep your phone in your pocket.