Transactions

tags.notion.link

Link a project to a Notion page or database row with page, sourceOfTruth (notion: name, dates, status, budget and description come from Notion; oatmilk: Oatmilk writes them to Notion) and idempotencyKey. Pass tagId (and optionally the project's expectedRevision) to link an existing project, or leave it out to create a project from the page (optionally parentId and color). For a database row, properties is required: the Notion property for each of dates, status, budget and description, or null to leave it out (accounting_tags_notion_preview suggests them; nothing is mapped silently). Linking syncs once straight away and never empties a filled field on either side: where one side is empty the filled value is kept, reads the page text as context for the classifier, and asks the classifier to suggest transactions for the project.

POST/api/v1/accounting/tags.notion.link

Permissions

accounting:readaccounting:write

Who can call it

admin, finance

Retries

Idempotency key required, with expectedRevision

MCP

accounting_tags_notion_link

Reaches outside Oatmilk

It emails people or calls another service.

Fields

  • tagIdstring (ID)

    The ID of a project tag, from tags.list.

  • expectedRevisioninteger

    The record's current revision, from the last time you read it. If someone changed the record since, the request is refused with a conflict so you can reload and check before trying again.

    at most 9007199254740991 · greater than 0

  • pagestringRequired

    1–2000 characters

  • sourceOfTruthenumRequired
    oatmilknotion
  • propertiesobject

    No other fields

  • parentIdstring (ID)

    The ID of the related record.

  • colorenum
    grayredorangeambergreentealbluepurplepink
  • idempotencyKeystringRequired

    Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match.

    8–200 characters

Example

curl https://app.getoatmilk.com/api/v1/accounting/tags.notion.link \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "page": "example",
  "sourceOfTruth": "oatmilk"
}'
Response
{
  "data": { … }
}

Try it

Try it

Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.

POST/api/v1/accounting/tags.notion.link
curl https://app.getoatmilk.com/api/v1/accounting/tags.notion.link \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "page": "example",
  "sourceOfTruth": "oatmilk"
}'

More in Transactions.