# YouGile — two-way integration with MMW

> Connect YouGile to MMW, manage tasks and comments and search archived records.

**YouGile ↔ MMW** lets you manage selected YouGile projects from MMW and retrieve archived tasks and comments through a connected AI assistant.

## How to obtain a YouGile API key

There is no regular **Create API key** button in YouGile profile settings. For YouGile Cloud, use the **official interactive REST API v2 console**. You need your account email, password and the company identifier (`companyId`).

1. **Copy your company ID.** Open any page belonging to the appropriate company in YouGile. Press **Ctrl + Alt + Q** (Windows) or **Ctrl + Option + Q** (macOS). YouGile copies the `companyId` to your clipboard. Alternatively, use the official [Get companies](https://ru.yougile.com/api-v2#/operations/getCompanies) interactive endpoint, enter your YouGile sign-in details on that official page and request a list of company IDs.
2. Open the official [Create API key](https://ru.yougile.com/api-v2#/operations/AuthKeyController_create) endpoint. In the interactive console, fill in `login` (your YouGile account email), `password` (your YouGile account password), and the copied `companyId`. **Only enter your password on the official YouGile site**, not in MMW.
3. Click **Send API Request**. The response contains a `key` field, for example `{"key":"YOUR_SECRET_API_KEY"}`. Copy **only the value of `key`**, without JSON punctuation or the field name.
4. Keep the key in a secure password manager. Never share it in chats or task comments.
5. Open [MMW Integrations](https://app.mmwhub.tech/dashboard?tab=integrations) → **YouGile**, paste the key, click **Verify key**, select accessible projects, then click **Connect projects**.

Disconnecting YouGile in MMW deletes the copy of the key stored in MMW. **It does not revoke the original key in YouGile.** If your previous YouGile key is still valid and available to you, reuse it; you do not need to generate another one.

### Troubleshooting API key creation

- **Cannot find `companyId`?** Use the official [Get companies](https://ru.yougile.com/api-v2#/operations/getCompanies) endpoint instead of the shortcut.
- **Authentication error?** Verify your YouGile sign-in details on the official YouGile website and check the chosen company ID.
- **Projects are missing?** An API key has the permissions of the YouGile user who generated it. The user must have access to the projects.
- **Cannot create another key?** Each YouGile account is limited to **30 active API keys**. The official [REST API console](https://ru.yougile.com/api-v2#/) also provides key-management methods.
- **Need YouGile's own guide?** See the [official YouGile API-key instructions](https://help.yougile.com/books/baza-znanii-yougile/page/rest-api-v20-v-yougile).

## Connect YouGile

1. Sign in to your [MMW dashboard](https://app.mmwhub.tech/dashboard?tab=integrations) with a verified email address, and open **Integrations**.
2. In the **YouGile** panel, enter a valid **YouGile REST API v2 key**. Obtain the key from YouGile or your workspace administrator. Never paste it into a chat or task comment.
3. Choose **Verify key**, select the projects MMW is allowed to access, and click **Connect projects**.
4. Choose a project and column to create or edit tasks, set deadlines, mark completion and add comments.

If the YouGile panel is not visible immediately after an MMW update, refresh the dashboard page.

## Supported actions

**MMW → YouGile:** create tasks; edit titles and descriptions; set or clear deadlines; complete or reopen tasks; read and add task comments. An explicit action sends the change to YouGile and the provider result is checked.

**YouGile → MMW:** automatically collect accessible projects, tasks, completion states and task-chat comments from your selected projects. Records are kept in a separate encrypted archive. New items are usually available **after the next collection, roughly every 10 minutes**; API delays may make this longer.

Ask your connected MMW AI client to search using the prefix **yougile:**, for example:

\`\`\`text
yougile:contract approval
\`\`\`

Results include matching archived task or comment text and its source task context. This is private archive search, not a live stream of every YouGile event.

## Permissions and privacy

- MMW accesses **only the projects you select**, within your YouGile account permissions.
- The connected key is **encrypted at rest** and is not displayed after saving.
- Archived records can be retrieved by the owner of the linked personal MMW space; they are not automatically added to shared organization memory.
- Task changes require an explicit action. MMW does not automatically publish arbitrary personal memories to YouGile.
- Concurrent edits are protected: if a task changed since it was read, refresh it before submitting another edit.

## Disconnect

In **Integrations → YouGile**, choose **Disconnect** and confirm. MMW revokes the stored API key and blocks further access to the linked archive. **Existing encrypted archived data is retained** unless you explicitly request its deletion through [MMW support](mailto:support@mmwhub.tech).

## Troubleshooting

1. Make sure you are signed in to a **personal MMW space** with a verified email.
2. Verify that the YouGile API key is valid and that you have access to the selected project and column.
3. Wait for the next collection cycle before searching for a new comment, and use exact words with the **yougile:** prefix.
4. On an edit conflict, refresh the task first; do not blindly retry a write with an uncertain outcome.
5. If problems persist, contact [support](mailto:support@mmwhub.tech) with the approximate time, project name and error message — **never your API key or sensitive task content**.

This integration executes explicit actions and archives observed states. It does not guarantee instant delivery, capture of every intermediate edit between polls or automatic conversion of all memory notes into tasks.
