Skip to content
MockFlow DevelopersGet an API key

A brief form on your website that has Mida build a workshop board before the first call.

Updated 14 Oct 20262 min read

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

  1. On start, read the workspace's callback secret with GET /webhooks/callback-secret.

  2. When the form is sent, create the board with POST /boards, a prompt and a callbackUrl. The response carries a job.

  3. When Mida finishes, MockFlow POSTs { eventId, status, boardId, boardUrl, imageUrl } to the callbackUrl, signed with the callback secret.

  4. Check the signature, answer 200 at once, ignore an eventId already 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.

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