Brief to workshop board with Mida
A brief form on your website that has Mida build a workshop board before the first call.
A consultancy asks every new client to fill in a short brief. With this example, the brief does more than land in an inbox: Mida, MockFlow's AI assistant, builds a first workshop board from the answers, such as a discovery board with goals, a customer journey and open questions, and your team gets the link before the first call.
Download the code (Node.js 18 or later, no packages)
What it does
Serves a brief form: company, goal, audience, the kind of workshop (discovery, strategy or UX) and notes.
Turns the answers into a prompt and has Mida build the board.
When the board is ready, posts its link and a preview image to your team's Slack channel.
How it works
On start, read the workspace's callback secret with
GET /webhooks/callback-secret.When the form is sent, create the board with
POST /boards, apromptand acallbackUrl. The response carries ajob.When Mida finishes, MockFlow POSTs
{ eventId, status, boardId, boardUrl, imageUrl }to thecallbackUrl, signed with the callback secret.Check the signature, answer
200at once, ignore aneventIdalready handled, and send the link on.
Without a public address, leave PUBLIC_URL empty: the example then polls the job with GET /jobs/{jobId} instead.
Run the example
Create an API key in the developer console with the scopes user:read, boards:write and ai:generate, then:
cp .env.example .env # paste your key into .env
node server.js # open http://localhost:3000
For the callback, expose the server on https, for example with ngrok http 3000, and set PUBLIC_URL to that address.
The key code
const board = await mf.post('/boards', {
title: `${f.company}: ${f.workshop} workshop`,
prompt,
callbackUrl: `${PUBLIC_URL}/mockflow/done`,
});
// Later, at /mockflow/done
if (!verifySignature(raw, req.headers['mockflow-signature'], callbackSecret)) return res.writeHead(401).end();
res.writeHead(200).end();
const body = JSON.parse(raw);
if (body.status === 'succeeded') ready(body.boardUrl, body.imageUrl);
Adapt it
Agencies: a campaign brief that becomes a moodboard and a content plan.
Product teams: a feature request form that becomes a first set of wireframes and a user flow.
Teachers: a lesson request that becomes a lesson plan with activities.
To get the same structure every time, add a skill to the request; see Term setup for teachers.
What you need
An API key with user:read, boards:write and ai:generate. Plus or Max; each board uses the workspace's AI credits.