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

# Connected apps

> Connect apps such as Gmail, Slack, and GitHub so agents can read them and, after your confirmation, write to them.

**Connected apps** let your agents work in the apps you already use, such as Gmail, Outlook, Slack, and GitHub. An agent reads your mail or posts a message through the app's own service. It does not need the screen or a browser.

Agents reach these apps through the [teamhub CLI](https://docs.heylinger.com/developers/teamhub-cli.md). The keys for each app stay with Composio, an outside service that holds app sign-ins for Linger.

Reads run directly. Some writes, such as sending mail, wait for a confirmation in the Room. This page explains which apps have commands, how to connect one, how confirmations work, and the limits.

## Which apps can agents use?

Eight apps have dedicated commands in the teamhub CLI:

| Area | Apps | Commands |
| - | - | - |
| Mail and calendar | Gmail, Outlook, Google Calendar | `gmail`, `outlook`, `gcal` |
| Messages | Slack | `slack` |
| Documents and files | Notion, Google Drive | `notion`, `gdrive` |
| Design and code | Figma, GitHub | `figma`, `github` |

Other connected apps, such as Canva or Linear, have no dedicated commands. Agents call them through `teamhub apps search` and `teamhub apps execute`.

Image and video generation also run through Composio. `teamhub image-gen` and `teamhub video-gen` use your fal.ai or Higgsfield connection.

Each command has its own help, which works offline:

```bash theme={null}
teamhub gmail --help
teamhub gdrive --help
```

## Turn on connected apps for your server

Connected apps need a Composio key. Without one, agents cannot use connected apps.

* **Server key.** The server admin sets `COMPOSIO_API_KEY` in `.env`.
* **Saved key.** When `COMPOSIO_API_KEY` is empty, any signed-in person can save one key in **Apps**. That key serves the whole deployment, not one user. The server encrypts it with `TEAMHUB_SECRET_ENCRYPTION_KEY`.

If several deployments share one Composio project, give each a different `TEAMHUB_COMPOSIO_ENVIRONMENT_KEY`. The value uses lowercase letters, digits, `_`, and `-`, starts with a letter or digit, and has at most 64 characters. The default is `default`. See [Environment variables](https://docs.heylinger.com/reference/environment-variables.md).

The web app shows an error code when saving a key or connecting an app fails:

| Code | Meaning | What to do |
| - | - | - |
| `COMPOSIO_KEY_REJECTED` | Composio rejected the key. | Check the key and save it again. |
| `COMPOSIO_CONNECTION_FORBIDDEN` | The key lacks permission, or the app is not in the Composio project. | Recreate the key with **Read All** and **Write All**, or add the app to the project. |
| `COMPOSIO_KEY_FROM_ENVIRONMENT` | The deployment already sets the key in `.env`. | Change `COMPOSIO_API_KEY` in `.env` instead. |
| `COMPOSIO_KEY_STORAGE_UNAVAILABLE` | `TEAMHUB_SECRET_ENCRYPTION_KEY` is not set. | Set it in `.env` and restart the server. |

## Connect an app

An agent asks for access when it needs an app. It runs `teamhub apps connect` with the app's key. Without an authorized account, Linger posts an authorization card in the current chat. Authorize the app from the card, and the agent runs its command again.

When you have more than one account for an app, the agent chooses one with `--account`. The value is a connection ID or the full account label:

```bash theme={null}
teamhub gmail list --query "from:billing@northwind.com" --account work@acme.com
```

## Confirm what agents write

Writes that reach other people wait for a confirmation card. Reads and most other writes run at once.

![The agent reads Lena's email in Gmail at once, TeamHub holds its reply as a confirmation card and the agent's turn ends, you press Send, and TeamHub sends the reply once.](https://mintcdn.com/lev9-doc/KMjrbW2a2bhwitOO/images/feature-connector-confirm.gif?s=ddb117d720d49dc8bcb0a35a04277e19)

A read runs at once; a send waits for your approval and then runs once.

| Action | What happens |
| - | - |
| Read mail, events, messages, or files | Runs at once. |
| Read your GitHub account, repositories, issues, and pull requests | Runs at once. |
| `gmail send` or `gmail reply`, `outlook send` or `outlook reply` | Waits for a confirmation card. |
| `slack send` | Waits for a confirmation card. |
| `notion create`, `notion append`, or `notion edit` | Waits for a confirmation card. |
| `github comment` or `github create-issue` | Waits for a confirmation card. |
| Other writes, such as `gmail draft`, `gmail archive`, `gcal create`, `gdrive upload`, `figma comment`, or `slack react` | Runs at once. |
| A tool called through `teamhub apps execute` that Linger does not classify, even a read | Waits for a confirmation card. |

The agent's Sponsor approves the card. A card that nobody answers expires after 24 hours.

An approved write runs exactly once. When the result of a write is unknown, the CLI never sends it again. Check the app yourself before you ask the agent to retry.

An agent can also draft an email on a canvas Document. `teamhub gmail canvas-draft` saves that Document as a Gmail draft and never sends it. Sending is a separate `gmail send --draft` call, which waits for confirmation:

```bash theme={null}
teamhub gmail canvas-draft document_q3_update --subject "Q3 update"
teamhub gmail send --draft r-5821
```

## Let Another Me watch your apps

[Another Me](https://docs.heylinger.com/agents/another-me.md) watches some connected apps and tells you what matters. It polls Gmail and Outlook inboxes, Google Calendar changes, and Slack mentions every 10 minutes. See [Proactive Another Me](https://docs.heylinger.com/agents/proactive.md).

You can turn automatic reminders on or off for each of your own connections. Ask Another Me, and it runs `teamhub apps auto-reminders set <connection-id> --on` or `--off`. Only Another Me can change this setting.

Connecting your inbox also starts your [personal memory](https://docs.heylinger.com/knowledge/personal-memory.md).

## Keep learning

> [card] [Proactive Another Me](https://docs.heylinger.com/agents/proactive.md)
>
> See how Another Me decides when to message you.

> [card] [Approvals](https://docs.heylinger.com/security/approvals.md)
>
> See every action that waits for your decision.

> [card] [teamhub CLI](https://docs.heylinger.com/developers/teamhub-cli.md)
>
> See how agents call Linger and connected apps.

> [card] [Desktop and browser](https://docs.heylinger.com/computer/desktop-and-browser.md)
>
> Let agents use apps on your screen instead.


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