For administrators

Put It in Front of Your Staff

Connect an Agent to Discord, LINE, or Slack, import your staff list, and have employees confirm their identity with their company email.

What you get
Staff never have to sign in to Office Power — they reach the AI assistant straight from the messaging app your company already uses.

The last thing employees want is to open one more website just to ask a question. This chapter connects the assistant to the messaging app your company already uses.

Before you start

  • You have a published Agent (see Chapter 7). A draft cannot connect to outside channels.
  • You have permission to create an application on one of Discord, LINE, or Slack. That usually means being your company’s administrator for that platform; if that is not you, you will need their help for this step.
  • You have a staff list to hand (names and company emails); an Excel file saved as CSV is enough.

Step 1 · Pick one channel

One Agent can have several channels open at once, but for a first rollout, open only one.

Channel Suits Watch out for
Slack Companies already working in Slack The simplest to configure; the platform can generate the configuration file for you
Discord Companies with an internal community or engineering team Requires three extra switches in the developer portal
LINE Letting everyone ask from their phone at any time Requires a publicly reachable address; check with your rollout contact before configuring

All three start by creating a bot on the other platform, then returning to Office Power to paste in the credentials you were given.

The platform has a full illustrated guide built in: go to the Agent’s「對話管道」(Chat Channels) tab, and every card has「📖 設定教學」(Setup Guide) in its top-right corner, with step-by-step instructions, outside links, and a table of common errors. Keep that guide open while you work; what follows is a summary of the key points.

Step 2 · Create a bot on the other platform

Slack (try this one first)

  1. Start in Office Power: Agent →「對話管道」(Chat Channels) tab → turn on「啟用 Slack」(Enable Slack) → click「產生 App Manifest」(Generate App Manifest) → choose「Socket Mode(免公網)」(Socket Mode, no public address needed) → click「複製」(Copy).
  2. Go to the Slack app portal at api.slack.com/apps → “Create New App” → choose “From a manifest” → pick your workspace → paste what you just copied → “Create”.
  3. In that app, go to “Basic Information” → “App-Level Tokens” → “Generate Token and Scopes” → any name, scope connections:write → this produces a token starting with xapp-. Copy it.
  4. Go to “OAuth & Permissions” → “Install to Workspace” → allow → copy the “Bot User OAuth Token” (starts with xoxb-).

Socket Mode needs neither a Signing Secret nor any public address.

Discord

  1. Go to discord.com/developers/applications → “New Application” → click “Bot” in the left-hand menu.
  2. Click “Reset Token” and copy the token. It is shown only once, so copy it immediately.
  3. Scroll down the same page to “Privileged Gateway Intents” and turn all three on: PRESENCE INTENT, SERVER MEMBERS INTENT, MESSAGE CONTENT INTENT, then click “Save Changes”. Leaving any of the three off causes a connection failure; turning on only some of them connects but leaves the bot reading without replying. This is the most common sticking point.
  4. Go to “OAuth2 → URL Generator”: tick the bot scope and the Send Messages and Read Message History permissions, then use the generated invite link to add the bot to your server.

LINE

  1. Go to the LINE Developers Console → create a Provider → create a “Messaging API” channel.
  2. On the “Basic settings” tab, copy the “Channel secret”.
  3. On the “Messaging API” tab, click “Issue” for the “Channel access token (long-lived)” and copy it.
  4. The Webhook URL setting on the same page: the Webhook URL to enter is written in Office Power’s「📖 設定教學」(Setup Guide) — copy it across, turn on “Use webhook”, and click “Verify” to test.
  5. Turn off “Auto-reply messages”, or LINE’s own canned replies will appear alongside the AI assistant’s answers.

LINE needs an address that is reachable from outside. If “Verify” keeps failing, check with your rollout contact what the outside address of your environment is.

Step 3 · Paste the credentials back into the platform and publish

Return to the Agent →「對話管道」(Chat Channels) tab, turn on the matching switch (「啟用 Slack」/「啟用 Discord」/「啟用 LINE」, Enable Slack / Discord / LINE), and paste the credentials you collected into the fields:

Channel Fields to paste into
Slack 「Bot Token(xoxb-)」,「App Token(xapp-)」(Socket Mode uses these two; leave「Signing Secret」empty)
Discord 「Bot Token」
LINE 「Channel Secret」,「Channel Access Token(長期)」(long-lived)

Once a field has been filled, it later shows「已設定(留空=不變更)」(Set; leave empty to keep unchanged) — you only need to paste again when you are swapping in a new one, not every time you save.

Discord has one more decision,「Mention 方式(何時回覆)」(Mention mode — when to reply):

  • 「mention — 一律需 @提及(最嚴格)」(always requires an @mention; strictest): choose this for busy channels.
  • 「involved — 主頻道需 @;自有討論串免」(@ required in the main channel, not in its own threads): the recommended value for normal use.
  • 「all — 回覆所有訊息(不需 @)」(replies to everything, no @ needed): choose this only for a channel dedicated to the AI.

To narrow the scope, you can fill in「允許的頻道 ID」(Allowed channel IDs) and「允許的使用者 ID」(Allowed user IDs), comma-separated; empty means all.

Click「儲存設定」(Save settings) in the toolbar at the top, then confirm this Agent is「已發布」(Published). The binding is created at publish time — in draft state the bot receives messages but never replies.

Step 4 · Import your staff list

Click「員工名錄」(Employee Directory) on the left. This is the anchor for identity — anyone not on the staff list cannot be bound to any channel.

Find the「CSV 匯入」(CSV import) block. The format is shown on screen; the first line holds the field names:

name,email,department,manager
Ming Wang,ming@company.com,Sales
Hua Li,hua@company.com,R&D/Platform,ming@company.com
  • name and email are required.
  • department is optional and supports a path such as “R&D/Platform”, which builds the org tree for you automatically — no need to create it in「組織架構」(Org Structure) first.
  • manager is optional; enter the manager’s email or employee id.

You can paste the CSV contents straight into the text box, drag a .csv file into the dashed box, or click「選擇檔案」(Choose file).

Click「匯入」(Import). The result shows「已匯入 N 筆」(N records imported); problem rows are listed under「略過 N 行:」(N rows skipped), each one telling you the line number and why it was skipped. Fix those lines and import again — records already imported are not duplicated.

The「員工列表」(Employee list) below shows name, email, department, manager, status, and binding. You can also add people one at a time with「新增員工」(Add employee) at the top.

Step 5 · Have employees complete identity binding

Employees do this step themselves; all you have to do is pass on the instructions — the staff chapter “Link Your Identity” is the version written for them, and you can share the link as it is.

  1. The employee talks to the bot for the first time on Discord / LINE / Slack (a direct message, or an @mention in a channel).
  2. The bot replies: 「初次見面,請告訴我你的公司 Email 完成身分驗證」 (Nice to meet you — tell me your company email to confirm your identity).
  3. The employee replies with their company email.
  4. The bot replies:「驗證碼已寄到你的信箱,請回覆 6 位數字」(A code has been sent to your inbox; reply with the 6 digits).
  5. The employee finds the email titled「Office Power 身分驗證碼」(Office Power identity verification code) and replies to the bot with the 6 digits. The code is valid for 10 minutes.
  6. Done. From then on that account talks to the bot directly and is never asked to verify again.

Slack has one convenience: if the employee’s Slack account email matches the one in the employee directory, they are bound automatically and skip the verification code entirely.

When someone leaves, find them in「員工名錄」(Employee Directory) and click「停用」(Deactivate) — every channel binding stops working at once, with no need to unbind them one by one. Click「復職」(Reinstate) to restore it when needed.

How you know it worked

  1. The people you just imported appear in the employee list in「員工名錄」(Employee Directory) with the status「在職」(Active).
  2. You say something to the bot yourself on Discord / LINE / Slack, and it asks you to confirm your identity.
  3. After finishing the verification, that employee’s「綁定」(Binding) column in「員工名錄」(Employee Directory) no longer reads「未綁定」(Not bound).
  4. Ask another question about company policy, and the bot’s answer matches what you get from「對話」(Chat) in the browser.
  5. Back in「稽核紀錄」(Audit Log), you can see an「Agent 使用」(Agent usage) event.

Common problems

Symptom Cause / fix
Discord reports a connection failure The three “Privileged Gateway Intents” switches are not all on, or the Bot Token was pasted wrong.
The Discord bot reads but never replies MESSAGE CONTENT INTENT is off.
The Slack bot reads but never replies The app was never installed with “Install to Workspace” (so the Bot Token is invalid), or the bot has not been invited into that channel.
The Slack connection keeps retrying The App Token was not pasted, or its scope is not connections:write.
LINE’s “Verify” fails The address is not reachable from outside, or the Channel secret was pasted wrong. Use the address given in「📖 設定教學」(Setup Guide), and ask your rollout contact if you are unsure.
LINE sends two replies, one of them canned “Auto-reply messages” on the “Messaging API” tab was not turned off.
The bot replies asking you to confirm your identity first That is the normal flow; every employee binds on first use. Work through Step 5.
The bot replies that the email is not found and to check it or contact an administrator That email is not in the employee directory, or that employee has been deactivated. Add the record in「員工名錄」(Employee Directory) or click「復職」(Reinstate).
An employee says the code never arrived Check the spam folder first. Asking repeatedly triggers rate limiting, and the message will say to wait a minute and try again, or that the limit has been reached.
The code expired It is valid for 10 minutes. Giving the company email again sends a fresh one.
The bot receives messages but does nothing at all That Agent is still a「草稿」(Draft). Channel bindings are created at publish time, so click「🚀 發布」(Publish) first.
Channel settings changed but behaviour did not If the page header shows「⚠ 已部署的 Runtime 仍在使用舊設定」, click「🔄 套用新設定並重啟」(Apply the new settings and restart).
You want to swap in a new token Paste the new one into the field and save. When a field shows「已設定(留空=不變更)」(Set; leave empty to keep unchanged), leaving it empty keeps the existing one.