Guides

Let the app read Feishu documents through the official API

When you give a role a Feishu link (a doc, spreadsheet, Base or wiki page) to read, import into the knowledge base, or post from, the app reads it in this order:

  1. The official Feishu API first, using the Feishu app you connected in Settings → Chat channels. This reads everything: the text, every sheet, every Base table, images in docs and attachments in sheets (PDF manuals and the like).
  2. If the API can't read it, ego takes over automatically. When your browser setting is ego, the app doesn't ask first; it opens the document in ego with the Feishu account you're signed in to there. This only gets the text on the page, not images or attachments.
  3. It tells you afterwards. The review card says which documents the API couldn't read and why, and links to this guide. It says this only the first time for each document; reading the same one again doesn't repeat it.

First: whose document is it?

A Feishu app only has access inside the company that created it. So:

  • Documents you made, or in your own company's Feishu: the API can read them. Grant access with the two steps below and you get everything.
  • Another company's Feishu documents (links from a partner or client, whose address starts with their company's Feishu domain): your app can't get into their Feishu, so the API usually can't read them. Reading them through ego is fine; there's no permission to set up. To get images and attachments, ask them to send the files and upload those to the knowledge base.

1. Give the Feishu app read access

Do this on the Feishu Open Platform, as someone who manages the app. Use the same app you connected in Chat channels; if you haven't connected one yet, follow Feishu bot: create the app, turn on long connection, get credentials first.

  1. Open the app → Permissions, search for and turn on these (all read-only):
  • View new docs (docx:document:readonly)
  • View spreadsheets (sheets:spreadsheet:readonly)
  • View Bases (bitable:app:readonly)
  • View wikis (wiki:wiki:readonly): needed when the document is in a wiki
  • View and download files in Drive (drive:drive:readonly): needed for images in docs and attachments in sheets
  1. Version management & release → create a version → submit it, and wait for your admin to approve it.

If you already turned on edit access (bitable:app, sheets:spreadsheet) for posting from a table or syncing creators, you don't need the read-only versions of those two.

2. Share the document with the app

With the permissions on, the app still has to be able to see the document:

  • One doc or sheet: open it in Feishu → "…" at the top right → "… More" → "Add document app" → pick your app. "Can view" is enough.
  • A whole folder: Feishu doesn't let an app be a folder collaborator. Make a group, add the app's bot to it, and share the folder with that group.
  • A whole wiki: wiki settings → members, and add the group that has the bot.

Then ask the role again ("import this document" or "read it again"). This time it goes through the API, and the card's "Read:" line says "Feishu API".

Common questions

  • The card says the Feishu app has no access to this document: step 2 wasn't done, or the app you added isn't the one connected in Chat channels.
  • The card says no Feishu app is connected: connect the Feishu bot in Settings → Chat channels first.
  • Still can't read it after granting access: it's most likely another company's document; see "Whose document is it?" above. Reading it through ego is fine.
  • ego can't open it either: the Feishu account you're signed in to in ego has no access to it. Ask the document's owner; the app never clicks "Request access" for you.
  • What ego misses: images and attachments (PDF manuals and the like). The card's "Couldn't read" section lists them. The weekly recheck reads these documents through ego too, with the same gaps.