# Synthesise research on a board

> Send tagged interview insights from your research tool to an affinity board.

Source: https://mockflow.com/developers/examples/oauth/research-synthesis

A user research tool collects interview quotes and tags them by theme and sentiment. Synthesis, though, happens with the team on a board. This example adds **Synthesise on a MockFlow board**: the researcher connects their MockFlow account, and their insights become an affinity board in it, ready for the team to cluster, vote on and draw conclusions from.

[**Download the code**](/developers/assets/examples/mockflow-research-synthesis.zip) (Node.js 18 or later, no packages)

## What it creates

- A board titled "Synthesis:" and the study's name, in the researcher's account.
- A section per theme, such as "Delivery slots (3)", sized to fit its notes.
- A [sticky note](/developers/reference/item-types/sticky-note) per quote, green for positive, pink for negative and yellow for neutral, with the participant as the note's author.

## How it works

1. The researcher connects MockFlow through the [OAuth flow](/developers/concepts/oauth-apps) with the scopes `user:read boards:write`, as in [Open as a MockFlow board](/developers/examples/oauth/open-as-board).
2. With their access token, [create the board](/developers/reference/boards/create-board).
3. Lay out the sections and notes in a grid, and draw them with [batches](/developers/reference/items/batch-items). A batch takes up to 100 operations, so a large study is sent in several.

## Run the example

Register an app in the **OAuth apps** tab of the [developer console](/developers/console/?tab=oauth) with the redirect URI `http://localhost:3000/oauth/callback` and the scopes `user:read` and `boards:write`. Then:

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

## The key code

```javascript
const board = await mf.post('/boards', { title: `Synthesis: ${study.study}` });
const ops = layout();   // a section per theme, a sticky note per quote
for (let i = 0; i < ops.length; i += 100) {
  await mf.batch(board.id, ops.slice(i, i + 100));
}

// One note
{ op: 'create', item: {
  type: 'sticky_note',
  position: { x, y },
  size: { width: 220, height: 220 },
  data: { text: `"${n.quote}"`, color: COLORS[n.sentiment], author: n.participant },
} }
```

## Adapt it

- **Survey tools:** open answers grouped by question, as notes to cluster.
- **Feedback tools:** customer feedback by product area, before roadmap planning.
- **Workshop tools:** ideas collected online, laid out for the in person session.

## What you need

An OAuth app with the scopes `user:read` and `boards:write`. Works for users on every plan; Basic accounts have three boards.
