Skip to content
MockFlow DevelopersGet an API key

Let users connect MockFlow to your AI assistant with read access only.

Updated 14 Oct 20262 min read

An AI assistant product wants to answer from its users' MockFlow boards: "summarise the onboarding research board", "what is still open on the launch plan?". People will only connect it if they can trust it. This example asks for read access only, so MockFlow's consent screen tells people plainly that the assistant can read their boards and cannot change them.

Download the code (Node.js 18 or later, no packages)

What it does

  • Asks for the scopes user:read and boards:read, and nothing more.

  • Lists the user's recently updated boards, and searches their boards by title.

  • For a chosen board, shows exactly what the assistant reads: the board's outline as Markdown, to put in the model's prompt with the user's question.

  • Treats a 401 from the API as the user having disconnected the app in MockFlow.

How it works

  1. The user connects through the OAuth flow with scope=user:read boards:read. Asking for the least a feature needs is the best way to be trusted; see Scopes.

  2. List recent boards with GET /boards/recent, or search with GET /search?type=board&q=.

  3. Read a board as text with GET /boards/{boardId}/outline and Accept: text/markdown, and give it to your model with the question.

Run the example

Register an app in the OAuth apps tab of the developer console with the redirect URI http://localhost:3000/oauth/callback and only the scopes user:read and boards:read. Then:

cp .env.example .env        # paste the client ID and secret into .env
node server.js              # open http://localhost:3000

The key code

const SCOPES = 'user:read boards:read';   // what the consent screen shows

const token = await accessTokenFor(store, userId, app);
if (!token) return redirect(res, '/connect');
const mf = new MockFlow({ token });

const board = await mf.get(`/boards/${boardId}`);
const outline = await mf.get(`/boards/${board.id}/outline`, { accept: 'text/markdown' });
// put `outline` and the user's question in your model's prompt

Adapt it

  • Chat assistants: add the outline of the board a user mentions to the conversation.

  • Meeting notes tools: link a meeting's board and include its decisions in the summary.

  • Enterprise search: index the outlines of the boards each user can open.

What you need

An OAuth app with the scopes user:read and boards:read. Works for users on every plan.

Was this page helpful?

Sign in to MockFlow

The same account you use in the app and on the API.

Forgot your password?
or
Continue with GoogleContinue with MicrosoftContinue with Apple