# Client History Brief - Freelance Client Notes, Lessons & Trends (`kotaro-project/client-history-brief`) Actor

Paste your own freelance deal log (CSV, TSV or JSON) and get one brief per client: past deals and amounts, likes and dislikes, what you already asked, warnings, last files, usual lead time and two draft lines for your next delivery. Optional trends row. No AI key, nothing stored.

- **URL**: https://apify.com/kotaro-project/client-history-brief.md
- **Developed by:** [KOTARO project](https://apify.com/kotaro-project) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 client briefs

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Client History Brief

Paste your own deal log and get, for each client, what to remember before you reply or deliver: past deals, likes, what you already asked for, warnings, last files, usual lead time and two draft lines for the delivery message. A trends row shows repeat clients and the price bands where your deals finish.

### What you can set

- **ledgerText**: CSV, TSV or JSON with a header line. One row per deal. Use client display names only; do not include real names, addresses, phone numbers or e-mails. Japanese headers such as 依頼者 and 次に生かすこと are also understood.
- **ledgerUrl**: Optional. A link to the same file, best kept in private storage such as an Apify key-value store record. Do not publish your log on a public page.
- **client**: Optional. A display name from the log. Empty: one brief for every client.
- **request**: Paste the new request to list similar past work.
- **includeTrends**: One more row with repeat clients, top client types and price bands.
- **columnMap**: Only if your headers differ, for example {"nextTime": "Lessons", "client": "Customer"}. Standard names: client, site, contract, date, clientType, needs, preferences, tendencies, amount, status, deliveryPath, nextTime, leadTimeHours, askedAndReceived, cautions.

### What you get

One row per client (and one optional trends row): `ok`, `error`, `client`, `dealCount`, `totalAmount`, `firstDate`, `lastDate`, `sites`, `clientType`, `needs`, `preferences`, `tendencies`, `nextTime`, `askedBefore`, `cautions`, `hasCaution`, `lastStatus`, `lastDelivery`, `typicalLeadTimeHours`, `improvementLines`, `similarPastWork`, `type`, `summary`, `clientCount`, `repeatClients`, `repeatRate`, `topClientTypes`, `amountBands`.

### Pricing

You pay per client brief and per trends row. Empty or unreadable logs return a free note.

### Limits

It reads only the log you give it, during the run, and does not keep a copy. It uses fixed rules, not an AI model, so nothing is sent to an AI service. Up to 5,000 rows. Links must be public http or https addresses; private and internal addresses are refused.

### Start your own log

Copy this header into a spreadsheet and add one row per deal:

```
client,site,contract,date,clientType,needs,preferences,tendencies,amount,status,deliveryPath,nextTime,leadTimeHours,askedAndReceived,cautions
```

# Actor input Schema

## `ledgerText` (type: `string`):

CSV, TSV or JSON with a header line. One row per deal. Use client display names only; do not include real names, addresses, phone numbers or e-mails. Japanese headers such as 依頼者 and 次に生かすこと are also understood.

## `ledgerUrl` (type: `string`):

Optional. A link to the same file, best kept in private storage such as an Apify key-value store record. Do not publish your log on a public page.

## `client` (type: `string`):

Optional. A display name from the log. Empty: one brief for every client.

## `request` (type: `string`):

Paste the new request to list similar past work.

## `includeTrends` (type: `boolean`):

One more row with repeat clients, top client types and price bands.

## `columnMap` (type: `object`):

Only if your headers differ, for example {"nextTime": "Lessons", "client": "Customer"}. Standard names: client, site, contract, date, clientType, needs, preferences, tendencies, amount, status, deliveryPath, nextTime, leadTimeHours, askedAndReceived, cautions.

## Actor input object example

```json
{
  "ledgerText": "client,site,contract,date,clientType,needs,preferences,tendencies,amount,status,deliveryPath,nextTime,leadTimeHours,askedAndReceived,cautions\nBloomCafe,CrowdWorks,C-101,2026-09-02,Cafe owner running Instagram,3 Instagram posts for the autumn menu,Warm beige tones; no stock-photo look,Replies within hours; friendly,6000,completed,/work/bloomcafe/2026-09,Send two color options first,26,Logo and menu photos (received),\nBloomCafe,CrowdWorks,C-118,2026-10-05,Cafe owner running Instagram,Halloween post and story,Same beige palette; short copy,Quick approval,4000,completed,/work/bloomcafe/2026-10,Keep the copy under 20 words,20,Logo already on file,\nKito Design,Lancers,L-552,2026-09-15,Design agency (contest style),Spa campaign banner 1080x1080,Strict brief: colors and fonts fixed,Formal; does not announce results,1000,delivered,/work/kito/spa,Follow the brief exactly; no extra options,5,Brief PDF (received),Asked to continue on LINE\nKito Design,Lancers,L-590,2026-10-20,Design agency (contest style),Winter banner set,Fonts fixed; NG word list,Slow replies,1000,not selected,/work/kito/winter,Check the NG words twice,4,,Invited to a paid course\nSunnyClinic,Coconala,K-77,2026-10-01,Small clinic,A4 flyer for flu shots,Clean white; large type for seniors,Careful; asks many questions,15000,completed,/work/sunny/flyer,Prepare a print-ready PDF and a PNG,48,Opening hours and map (received),\nSunnyClinic,Coconala,K-91,2026-11-02,Small clinic,Website banner for the new opening hours,Same layout as the flyer,Repeat client; trusts us,8000,in progress,/work/sunny/banner,Reuse the flyer colors,,Hours already received,\n",
  "client": "BloomCafe",
  "request": "Christmas Instagram post with the same warm look",
  "includeTrends": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "ledgerText": `client,site,contract,date,clientType,needs,preferences,tendencies,amount,status,deliveryPath,nextTime,leadTimeHours,askedAndReceived,cautions
BloomCafe,CrowdWorks,C-101,2026-09-02,Cafe owner running Instagram,3 Instagram posts for the autumn menu,Warm beige tones; no stock-photo look,Replies within hours; friendly,6000,completed,/work/bloomcafe/2026-09,Send two color options first,26,Logo and menu photos (received),
BloomCafe,CrowdWorks,C-118,2026-10-05,Cafe owner running Instagram,Halloween post and story,Same beige palette; short copy,Quick approval,4000,completed,/work/bloomcafe/2026-10,Keep the copy under 20 words,20,Logo already on file,
Kito Design,Lancers,L-552,2026-09-15,Design agency (contest style),Spa campaign banner 1080x1080,Strict brief: colors and fonts fixed,Formal; does not announce results,1000,delivered,/work/kito/spa,Follow the brief exactly; no extra options,5,Brief PDF (received),Asked to continue on LINE
Kito Design,Lancers,L-590,2026-10-20,Design agency (contest style),Winter banner set,Fonts fixed; NG word list,Slow replies,1000,not selected,/work/kito/winter,Check the NG words twice,4,,Invited to a paid course
SunnyClinic,Coconala,K-77,2026-10-01,Small clinic,A4 flyer for flu shots,Clean white; large type for seniors,Careful; asks many questions,15000,completed,/work/sunny/flyer,Prepare a print-ready PDF and a PNG,48,Opening hours and map (received),
SunnyClinic,Coconala,K-91,2026-11-02,Small clinic,Website banner for the new opening hours,Same layout as the flyer,Repeat client; trusts us,8000,in progress,/work/sunny/banner,Reuse the flyer colors,,Hours already received,`,
    "client": "BloomCafe",
    "request": "Christmas Instagram post with the same warm look"
};

// Run the Actor and wait for it to finish
const run = await client.actor("kotaro-project/client-history-brief").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "ledgerText": """client,site,contract,date,clientType,needs,preferences,tendencies,amount,status,deliveryPath,nextTime,leadTimeHours,askedAndReceived,cautions
BloomCafe,CrowdWorks,C-101,2026-09-02,Cafe owner running Instagram,3 Instagram posts for the autumn menu,Warm beige tones; no stock-photo look,Replies within hours; friendly,6000,completed,/work/bloomcafe/2026-09,Send two color options first,26,Logo and menu photos (received),
BloomCafe,CrowdWorks,C-118,2026-10-05,Cafe owner running Instagram,Halloween post and story,Same beige palette; short copy,Quick approval,4000,completed,/work/bloomcafe/2026-10,Keep the copy under 20 words,20,Logo already on file,
Kito Design,Lancers,L-552,2026-09-15,Design agency (contest style),Spa campaign banner 1080x1080,Strict brief: colors and fonts fixed,Formal; does not announce results,1000,delivered,/work/kito/spa,Follow the brief exactly; no extra options,5,Brief PDF (received),Asked to continue on LINE
Kito Design,Lancers,L-590,2026-10-20,Design agency (contest style),Winter banner set,Fonts fixed; NG word list,Slow replies,1000,not selected,/work/kito/winter,Check the NG words twice,4,,Invited to a paid course
SunnyClinic,Coconala,K-77,2026-10-01,Small clinic,A4 flyer for flu shots,Clean white; large type for seniors,Careful; asks many questions,15000,completed,/work/sunny/flyer,Prepare a print-ready PDF and a PNG,48,Opening hours and map (received),
SunnyClinic,Coconala,K-91,2026-11-02,Small clinic,Website banner for the new opening hours,Same layout as the flyer,Repeat client; trusts us,8000,in progress,/work/sunny/banner,Reuse the flyer colors,,Hours already received,
""",
    "client": "BloomCafe",
    "request": "Christmas Instagram post with the same warm look",
}

# Run the Actor and wait for it to finish
run = client.actor("kotaro-project/client-history-brief").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "ledgerText": "client,site,contract,date,clientType,needs,preferences,tendencies,amount,status,deliveryPath,nextTime,leadTimeHours,askedAndReceived,cautions\\nBloomCafe,CrowdWorks,C-101,2026-09-02,Cafe owner running Instagram,3 Instagram posts for the autumn menu,Warm beige tones; no stock-photo look,Replies within hours; friendly,6000,completed,/work/bloomcafe/2026-09,Send two color options first,26,Logo and menu photos (received),\\nBloomCafe,CrowdWorks,C-118,2026-10-05,Cafe owner running Instagram,Halloween post and story,Same beige palette; short copy,Quick approval,4000,completed,/work/bloomcafe/2026-10,Keep the copy under 20 words,20,Logo already on file,\\nKito Design,Lancers,L-552,2026-09-15,Design agency (contest style),Spa campaign banner 1080x1080,Strict brief: colors and fonts fixed,Formal; does not announce results,1000,delivered,/work/kito/spa,Follow the brief exactly; no extra options,5,Brief PDF (received),Asked to continue on LINE\\nKito Design,Lancers,L-590,2026-10-20,Design agency (contest style),Winter banner set,Fonts fixed; NG word list,Slow replies,1000,not selected,/work/kito/winter,Check the NG words twice,4,,Invited to a paid course\\nSunnyClinic,Coconala,K-77,2026-10-01,Small clinic,A4 flyer for flu shots,Clean white; large type for seniors,Careful; asks many questions,15000,completed,/work/sunny/flyer,Prepare a print-ready PDF and a PNG,48,Opening hours and map (received),\\nSunnyClinic,Coconala,K-91,2026-11-02,Small clinic,Website banner for the new opening hours,Same layout as the flyer,Repeat client; trusts us,8000,in progress,/work/sunny/banner,Reuse the flyer colors,,Hours already received,\\n",
  "client": "BloomCafe",
  "request": "Christmas Instagram post with the same warm look"
}' |
apify call kotaro-project/client-history-brief --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kotaro-project/client-history-brief"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/64bWxa1wLa4hOMQdx/builds/cSAKn2VhW2C68ceMW/openapi.json
