Slack, Discord, Telegram and Lark
Text Cook from Lark
Create your own Lark bot with one approval, connect it to Cook, let it use your computer, and send it work from your phone.
Lark is not generally available yet. It is off for workspaces by default, so most workspaces have no Lark row under Chat apps. If you want it, ask us to switch it on for your workspace.
Before you start
- You need to be an owner or admin of your Cook workspace.
- You need a Lark account (Lark Suite, or Feishu in China).
- For tasks on your own computer, install Cook Desktop and keep it open. Without it, Cook still answers, and does browser work in its cloud browser instead.
Create the bot and connect it
There is no shared Cook bot in Lark. Your workspace creates its own bot, inside your own Lark organization.
- In Cook, open Settings, then the Apps tab. Under Chat apps, press Set up on the Lark row.
- Press Create the bot in Lark. Lark’s page opens in a new tab. Cook also shows a QR code: scan it with the Lark app on your phone if you are not signed in to Lark in this browser.
- On Lark’s page, confirm it is you, look over what the bot may do, and press Create. Lark creates the bot and adds it to your organization.
- Back in Cook, the card says Connected as and the bot’s name. The Lark account that approved it is already paired to your Cook account.
The card shows until when the page works. If it runs out, press Get a new code.
Lark’s page is Lark Suite’s (larksuite.com). On Feishu, make the app in Feishu’s developer console and connect it with Use an existing app below.
If the card says Waiting for your Lark admin to approve the app, an admin of your Lark organization has to approve the new app in Lark before it is enabled.
You can also ask Cook in chat to set it up (“set up Cook in Lark for me”). It sends you the same Lark page.
If you already made an app in Lark
Press Use an existing app instead. The app must be set to receive events over
a long connection in Lark’s developer console. To let Cook show people’s names,
also give it the permission contact:user.base:readonly. Copy its App ID and
App Secret from the app’s Credentials page, choose Lark or Feishu, and
press Connect app.
After you connect, Cook never shows the App Secret in the page. To stop the bot, press Disconnect on the same card.
Bring in your team
When someone who is not paired writes to the bot, the owners and admins of your Cook workspace who are paired to it get a pairing request in their own chat with the bot, with Approve and Deny. Once approved, the person joins your Cook workspace as a guest and their first message goes through.
The request names the person as your Lark organization’s contacts list them. If your Lark admin has limited which people the bot can see in contacts, a person outside that group is named Lark user.
To pair another Lark account of your own, press Get my pairing code on the
card and send the line it shows (/pair and the code) to the bot. The code works
once, for 15 minutes.
Let it use your computer
- In the bot’s chat, send
/desktop. - Cook Desktop shows Lark wants to use your desktop browser. Choose Always allow on this computer, or Approve one turn for a single task.
- The bot confirms in the chat.
With Always allow, every task in that chat can use this computer’s browser
and its logins, including while you are away, as long as Cook Desktop is open.
Send /desktop off to stop, or press Revoke under Desktop approvals in
the channel’s Connect this channel window.
Asking it for something
Write the way you would message a person. For example:
hey can you open trycook.ai on my computer and send me a quick video scrolling through the homepage?
The bot keeps one message up to date with each step while it works (opening the page, recording, saving), then settles it when the task is done.
What comes back
- Screenshots arrive as images.
- Recordings arrive as videos you can play in the chat.
- Documents arrive as files. Lark caps a bot upload at 30 MB per file, and at 10 MB for an image; a larger image arrives as a file.
- Replies arrive as Lark rich text, with headings, lists, links, code and tables.
Commands
Lark has no command menu for bots, so type them.
| Send | What it does |
|---|---|
/desktop | Ask to use your computer’s browser |
/desktop off | Stop using your computer; tasks go back to the cloud browser |
/stop | Stop the task that is running |
/new | Start a fresh conversation |
/status | Show whether a task is running, whether your computer is connected, and what the chat may use |
/workspace | Show or switch which Cook workspace the bot works in |
/help | List what the bot can do and every command |
If something does not arrive
- The bot does not do what you ask: your Lark account may not be paired to your Cook account. Press Get my pairing code in Cook and send the line to the bot.
- Tasks run in the cloud, not on your computer: Cook Desktop is closed, or
desktop access is off. Open Cook Desktop and send
/desktop. - There is no Lark row, or the Set up button is grey: Lark is not switched on for your workspace (see the note at the top), or you are not an owner or admin. Only owners and admins can connect a bot.
If your team uses Slack, Discord or Telegram
See If your team already uses Slack, If your team already uses Discord and Text Cook from Telegram.