Ask your boards
Find the boards about a topic and answer a question from them, for an assistant or Slack bot.
Teams make decisions on boards: launch plans, retros, research. Weeks later someone asks "what did we decide about pricing for the Q3 launch?" and nobody remembers which board it was on. This example finds the right board and answers from it, the core of an internal assistant or a Slack bot.
Download the code (Node.js 18 or later, no packages)
What it does
Two ways to answer, from the same search:
Mida answers: Mida, MockFlow's AI assistant, answers from the best matching board and names the items it used.
Your own model answers: the matching boards are printed as Markdown, ready to put in your AI model's prompt or a search index. This needs only read access and works on every plan.
How it works
Search board titles with
GET /search?type=board&q=Q3 launch.For Mida's answer, ask about the board with
POST /boards/{boardId}/ai/askand the question. The answer is Markdown withsources.For your own model, read each board as text with
GET /boards/{boardId}/outlineandAccept: text/markdown: its sections, the items in reading order and the connections between them.
Run the example
Create an API key in the developer console with the scopes user:read and boards:read, adding ai:generate for Mida's answers, then:
cp .env.example .env # paste your key into .env
node ask.js "Q3 launch" "What did we decide about pricing?"
node ask.js "Q3 launch" "What did we decide about pricing?" --context
The key code
const found = await mf.get(`/search?type=board&limit=3&q=${encodeURIComponent(topic)}`);
const best = found.data[0];
// Mida answers, with sources
const res = await mf.post(`/boards/${best.boardId}/ai/ask`, { question });
// Or: the board as Markdown for your own model
const outline = await mf.get(`/boards/${best.boardId}/outline`, { accept: 'text/markdown' });
Adapt it
Slack bot: run the same steps from a slash command and reply with the answer and the board's link.
Weekly digest: read the outlines of boards changed this week and have your model summarise them for a newsletter.
Search index: index every board's outline so your intranet search finds what is on boards.
To let other people connect their own boards to your assistant, see Read-only connector for an AI assistant.
What you need
An API key with user:read and boards:read for search and outlines, on every plan. Mida's answers add ai:generate, need Plus or Max, and use AI credits.