> For the complete documentation index, see [llms.txt](https://docs.lleverage.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lleverage.ai/publishing-guide/publishing-workflows.md).

# Publishing Workflows

Publishing a workflow in Lleverage creates a numbered version and makes it available for use based on its trigger type. Your edits on the canvas build up as a draft, and publishing turns that draft into the live version, so you can keep working without affecting what users see.

### Key Features

* Draft and published versions with clear badges
* Minor or major version numbering when you publish
* AI-suggested version comments describing what changed
* Publish, unpublish, and revert per version
* Different deployment options based on trigger type
* Public or Private visibility for app links
* Embed codes and API endpoints for integration into other applications

### Drafts and Versions

As soon as you change a published workflow, a new draft is created. In the Publish panel you'll see your versions listed:

* **Draft**: your unpublished changes, marked with a Draft badge
* **Published versions**: numbered versions, with the currently live one clearly indicated

> 💡 The draft is yours to experiment with. End users keep using the last published version until you publish again.

### How to Publish Your Workflow

1. First, test your workflow using the Run Panel to ensure it works as expected
2. Click the "Publish" button in the top right corner of your screen
3. Review any validation messages that appear (fix any issues if necessary)
4. Choose a **minor** or **major** version bump: minor for small tweaks, major for significant changes
5. Add a version comment describing the change. Lleverage suggests one for you based on what changed, which you can accept or edit.
6. Confirm to publish. The new version goes live and appears in your version list.

### How to Manage Versions

**To unpublish a version:**

1. Open the Publish panel
2. Find the published version and choose unpublish
3. The workflow is no longer available to users until you publish again

**To revert to an earlier version:**

1. Open the Publish panel and find the version you want to go back to
2. Choose revert to bring the canvas back to that version's state
3. Publish when you're ready to make it live again

**To discard your draft:**

1. Open the Publish panel while you have unpublished changes
2. Choose discard draft to throw away the draft and return to the last published version

> ⚠️ Discarding a draft removes your unpublished changes, so make sure you no longer need them.

### App Visibility: Public or Private

Workflows with an App trigger can be published as **Public** or **Private**:

* **Public**: anyone with the link can open and use the app
* **Private**: only signed-in members of your workspace can use it

The visibility is configured on the App trigger, and the Publish panel shows the matching links: a public link when the app is Public, and an internal workspace link either way.

### How to Publish Different Trigger Types

**App Trigger (form or chat):**

1. The Publish panel displays your app links: the internal workspace link and, for Public apps, the public link
2. Copy a link to share with users
3. Click "Get Code" to access embed code for integrating the app into other websites

**API Call Trigger:**

1. The Publish panel displays an API endpoint
2. Copy the endpoint URL for API integration
3. View code examples in Node.js, Python, PHP, and Go
4. No app link is provided (API calls don't have user interfaces)

**Schedule Trigger:**

1. The Publish panel displays schedule information
2. View when the workflow will run automatically
3. No user interface or shareability options are provided

**Integration Trigger:**

1. The Publish panel displays information about the integration
2. Similar to scheduled triggers, there is no user interface to share

> ⚠️ Schedule and Integration triggers run automatically from Lleverage's backend and don't have user interfaces to share.

### How to Embed Workflows in External Applications

**Using HTML Embed Code:**

1. Publish your workflow with an App trigger
2. Click "Get Code" in the Publish panel to access the embed code
3. Copy the provided HTML iframe code
4. Paste the code into your website, web application, or development project
5. The embedded workflow will function identically to the standalone app

**Using API Integration:**

1. Publish your workflow with an API Call trigger
2. Copy the API endpoint from the Publish panel
3. Choose from the provided code examples (Node.js, Python, PHP, Go)
4. Implement the API call in your development environment
5. Include the bearer token for authorisation as configured in your platform settings

> 💡 When embedded via iframe, the workflow functions exactly as it does when accessed directly through the app links.

> ⚠️ API integrations require a development environment and cannot be simply opened as HTML files in a web browser like embedded forms and chats.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.lleverage.ai/publishing-guide/publishing-workflows.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
