KBAISE/ for lovable
Library
Docs

Edge functions

about 5 minBuildingchecked 6d agoOfficial page
The short version

Edge functions run private backend tasks like processing payments, sending emails, or connecting to outside services. Lovable writes and deploys them for you when you ask for these features in chat.

Anyone building features that require secure secrets, external services, or automated backend work.

Do this, in order

  1. 1

    Describe your backend feature in the project chat, mentioning any outside services, private keys, or automated triggers you need.

    There is no manual create button; Lovable automatically writes, sets up, and deploys the function based on your prompt.

  2. 2

    Navigate to More, select Database, click Manage, and choose Edge functions.

    This dashboard displays the status, call counts, and success rates of all your backend functions.

  3. 3

    Click an individual function to review its performance chart, or select View logs if a run failed.

    Logs reveal the exact error message so you can paste it back into the project chat for Lovable to fix.

Paste this into your project

Create a backend edge function that securely handles contact form submissions, validates the sender's input, and sends an email notification while keeping the API credentials hidden in project secrets.

Words decoded

Edge functions
Small backend programs running on Lovable's servers instead of the visitor's browser, keeping sensitive data and keys hidden.
Serverless
Code that runs on demand in the cloud without needing you to configure or maintain an actual computer server.
Invocations
The number of times a backend function was triggered and executed.

Where people get stuck

  • Edge functions do not run if your project database is paused, which will break any features that rely on them.
  • Anyone who discovers the web address of an edge function can send requests to it, so you must ensure Lovable adds authentication checks to verify who is calling it.
  • Do not look for an 'Add Function' button in the dashboard; functions can only be created by asking Lovable in the chat.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.