> ## Documentation Index
> Fetch the complete documentation index at: https://docs.outerlayer.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Start work from Slack

> Mention OuterLayer in a Slack thread to draft a spec, approve it, and start the build without leaving Slack.

Mention OuterLayer in a Slack thread. OuterLayer turns the thread into a [draft](https://docs.outerlayer.ai/draft-a-spec.md). An agent writes the spec. A member approves it in the thread. OuterLayer then files the issue and requests the build.

Mentions, message shortcuts and buttons work on every Slack plan, free included.

Slack is in early access. **Slack** shows in **Settings** only for an organization that has Slack turned on. To turn it on, email [hello@outerlayer.ai](mailto:hello@outerlayer.ai).

## Before you start

* An organization admin connects each Slack workspace the team uses. An organization connects as many workspaces as it needs. A workspace belongs to one organization.
* Each member links their Slack account once in each workspace.
* The factory needs a connected repository. Without one, the agent cannot write the spec, and the thread links the draft so a member writes it.

## Connect a workspace

You need **Connect Slack** to connect a workspace.

1. Open **Settings**, then **Slack**.
2. Choose **Connect Slack**.
3. Choose the workspace in Slack and allow the app.

The page then shows *Connected to* and the workspace name.

To connect another workspace, choose **Connect another workspace**. Then choose the next workspace in Slack and allow the app. Each workspace has its own channels, follows and **Disconnect** button. A person links their Slack account once in each workspace.

To send work from a channel to a factory, map the channel. You need **Map Slack channels**.

1. Under **Channels in** the workspace, choose a channel and a factory.
2. Choose **Add**.

A mention in a mapped channel goes to its factory. In an unmapped channel, OuterLayer asks the member which factory to use. When the organization has one factory, OuterLayer uses it.

A workspace connected before OuterLayer copied images has no file access. To allow it, choose **Connect another workspace** and pick the same workspace in Slack. Its channels, follows and member links stay.

To disconnect a workspace, choose its **Disconnect** button. The confirmation names the workspace. You need **Disconnect Slack**. OuterLayer deletes that workspace's bot token, channels and follows. A later mention in it does nothing. Other workspaces stay as they were.

## Link your Slack account

A member who is not linked gets a message that only they see. It has a **Link your account** button.

1. Choose **Link your account**. Sign in to OuterLayer if the page asks.
2. Choose **Link my Slack account**.

The link lasts 15 minutes. A link that has expired shows *This link has expired*. Mention OuterLayer again to get a new one.

OuterLayer acts for you with your own permissions. A Slack user who is not linked cannot start, approve or build anything.

## Start a draft

You need **File a spec** in the factory.

* Mention OuterLayer in a thread.
* Or choose **Create work item** from the message menu of a message in the thread.

OuterLayer reads the thread once. It reads up to 15 messages. It creates a draft and posts the draft's link in the thread. If the member also has **Comment on work** and the factory has a connected repository, OuterLayer asks the agent to write the spec.

A thread has one work item. A second mention in the same thread creates nothing. OuterLayer posts the link of the existing item.

### Images in the thread

OuterLayer copies the images that people posted in the messages it reads. PNG, JPEG, GIF and WebP images count. The images show on the work item, on the message that asks the agent for the spec. When no agent is asked, a comment holds them. The agent opens them before it writes the spec.

The member who starts the work needs **Comment on work** for the copy. OuterLayer copies up to 10 images, 8 MiB each and 10 MiB together. When an image is not copied, OuterLayer says why in a message that only you see. The draft starts anyway.

## Approve and build

When the agent hands the draft back, OuterLayer posts to the thread:

* the spec's summary
* the text of each criterion
* an **Approve and build** button
* an **Open in OuterLayer** link

You need **File a spec** and **Add work**. Choose **Approve and build**. OuterLayer files the spec as an issue in the factory's tracker and requests a build for you.

When the factory has more than one place to file issues, OuterLayer asks which place to use. Only you see the question. OuterLayer files nothing until you choose.

When you lack a permission, OuterLayer names it in a message that only you see. It files nothing and requests no build.

If the spec changed after OuterLayer posted the message, OuterLayer asks you to open the item and approve the newest text.

## Build now

**Build now** skips the spec review. Choose **Build now** from the message menu of a message in the thread. You need **File a spec** and **Add work**.

OuterLayer files the thread as an issue and requests a build for you. If the factory has more than one place to file issues, it asks first.

## What OuterLayer posts

OuterLayer posts summaries, criteria, status and links to the thread. It never posts code, diffs, logs or file contents.

## What OuterLayer posts in the thread

The thread that started a work item shows its build. Each message is a short status with a link to the work item. A notice can arrive up to two minutes after the event.

| Event | The message |
| - | - |
| The build starts | Says the build started. Links to the work item. |
| The agent hands work back to a person | Mentions the member and links to the work item. OuterLayer posts one message for each round of hand-backs, after three quiet minutes. A member with a linked Slack account gets a Slack mention. Any other member is named by profile name. A member with no profile name is not mentioned. |
| The pull request opens | Links to the pull request. |
| The criteria are judged | Says how many criteria are proven out of the total. Links to the work item. |
| The build stops without a pull request | Gives the reason the work item page shows, in the same words. Slack shows the reason as plain text, and a long reason is cut short. Links to the work item. |

The message never holds the text of a comment. Open the link to read it.

OuterLayer posts one message for each event, even when it sees the event twice. A work item that did not start in Slack gets no messages in this thread. To see such work in a channel, [follow the factory](https://docs.outerlayer.ai/follow-work-in-slack.md). When Slack refuses a post, the build goes on. OuterLayer logs the failure.

## Refusals

| You see | Why |
| - | - |
| A **Link your account** button | Your Slack account is not linked. |
| A permission name in a message only you see | You lack that permission in the factory. |
| *Slack is not set up on this deployment* | The deployment has no Slack app. Email [hello@outerlayer.ai](mailto:hello@outerlayer.ai). |
| *This Slack workspace is connected to another organization* on **Settings** | Another organization connected that workspace first. It must disconnect the workspace before you can connect it. |
| A link to an existing work item | The thread already has one. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.