SFOLN

Demos / Document to Markdown – DOCX, PPTX, XLSX

Turn a tender pack into a compliance checklist

Calder & Wren Facilities bids for cleaning contracts. Every tender arrives as a pack of office files: an invitation in Word, a specification in Word, a briefing deck, a pricing workbook. Someone used to spend the first day reading all of it and copying each "shall" and "must" into a spreadsheet, and requirements hidden in slide notes or a workbook's instructions sheet were missed. Here every file in the pack is converted to Markdown as it arrives. The team's own LLM step reads that Markdown and drafts the checklist, and because headings, slides and sheets survive the conversion, each requirement points back to the file and section it came from.

Workflow

Where the API sits

  1. Trigger

    Tender pack received

    The bid coordinator saves the buyer's files into a new tender folder.

  2. API call

    Convert every file to Markdown

    One call with all file URLs. Word headings and tables become Markdown, decks come back slide by slide with notes, workbooks sheet by sheet. Unsupported files are reported and not charged.

    sfoln/document-to-markdown

  3. Your logic

    Extract requirements (your LLM)

    The team's own model reads each document in parts (sections for decks and workbooks, headings for Word) and returns requirements with the heading they were found under.

  4. Result

    Checklist for review

    A draft compliance checklist with type, source, owner and position; files that could not be read are listed as open items.

Wired as a folder trigger in n8n or Make: a new tender folder sends the file URLs to the API in one synchronous call, and the next node passes each record's Markdown to the team's language model. The API does the conversion only; the extraction prompt, the model and the checklist belong to the team. Files can be passed as short-lived signed URLs or as records of an Apify key-value store, so the pack does not have to be public.

Result

The tender pack, converted and checked

Bid deskEHT-2026-041 · Cleaning and waste servicesdue Fri 4 Dec 12:00

Files in the pack

5

Dropped into the tender folder

Converted to Markdown

4

19,210 words in total

Needs a person

1

Site plans: ask the buyer for a DOCX or PDF

Requirements drafted

9

By the team's own LLM step, for review

Tender pack EHT-2026-041 · received Mon 9 Nov from Easthaven Harbour Trust
FileDetectedTitleSizeContentWordsConversion
01-invitation-to-tender.docxdocxInvitation to Tender EHT-2026-04182 KB8 pages3,610Markdown ready
02-service-specification.docxdocxService Specification208 KB27 pages12,480Markdown ready2 blocks
03-supplier-briefing.pptxpptxCleaning and waste services 2027 to 20301.9 MB14 slides980Markdown ready
04-pricing-schedule.xlsxxlsxPricing schedule57 KB148 rowsin3 sheets2,140Markdown ready
05-site-plans.doclegacy .doc—3.2 MB——Not convertedunsupported_document
Four files converted. The 27-page specification is billed as two blocks of 20 pages; the legacy .doc was refused at no cost.
Bid deskConverted filesMarkdown from the API

02-service-specification.docx

02-service-specification.docx · markdown · sections 3 to 7 of 27 pages

## 3 Cleaning standards

### 3.1 Passenger terminal

The terminal is open to the public from 05:00 to 23:30 on every day of the year. Routine cleaning of public areas **shall** be completed between 23:30 and 05:00.

| Area | Frequency | Standard |
| --- | --- | --- |
| Arrivals and departures halls | Daily | Floors machine-scrubbed, no visible litter |
| Public washrooms | Every 2 hours while open | Checked, restocked, check sheet signed |
| Check-in desks and gates | Daily | Touch points disinfected |

### 3.4 Response times

The Contractor **shall** attend a spillage in a public area within 15 minutes of it being reported, at any hour the terminal is open.

## 5 Staffing

### 5.2 Security passes

All staff working in the port's restricted area **shall** hold a valid port security pass before their first shift. The Contractor bears the cost of vetting.

## 7 Environment

### 7.1 Waste

At least 70 % of waste by weight **shall** be diverted from landfill. The Contractor **shall** report waste weights by stream each month.

Word headings arrive as Markdown headings and the frequency table as a Markdown table, so the extraction step can cite "3.4 Response times" instead of a page number.

03-supplier-briefing.pptx

03-supplier-briefing.pptx · slides 6 and 9 of 14, one section each

## Slide 6: Site visit

- Thursday 19 November 2026, 10:00, Terminal 1 staff entrance
- Attendance is mandatory for every bidder
- At most two people per bidder
- Register by e-mail by 17 November; bring photo ID

> **Notes:** Bidders who do not attend will not be evaluated. No photography in the restricted area.

## Slide 9: Evaluation

- Quality: 60 %
- Price: 40 %
- Quality is scored on five method statements, each 0 to 5
- A score of 0 or 1 on any method statement excludes the tender

One section per slide, with the speaker notes. The rule that bidders who miss the site visit are not evaluated is only in the notes.

04-pricing-schedule.xlsx

04-pricing-schedule.xlsx · sheets 1 and 2 of 3

## Instructions

| Instructions to bidders |  |
| --- | --- |
| 1 | Enter a rate in every line of the Schedule of rates. A blank or zero rate makes the tender non-compliant. |
| 2 | Rates are fixed for the first 12 months and exclude VAT. |
…

## Schedule of rates

| Ref | Building | Task | Unit | Quantity per year | Rate | Annual total |
| --- | --- | --- | --- | --- | --- | --- |
| A1 | Terminal 1 | Routine night clean, public areas | visit | 365 |  |  |
| A2 | Terminal 1 | Washroom checks, 2-hourly | check | 3285 |  |  |
| A3 | Terminal 1 | Spillage response | call-out | 400 |  |  |
| B1 | Harbour office | Routine clean, offices | visit | 252 |  |  |
…

Each sheet is one Markdown table. The same run can return the rows as JSON to prefill the team's pricing model.

Bid deskCompliance checklistDraft: needs review
Compliance checklist · draft 1 · 9 requirements from 4 files
RefTypeRequirementSourceOwnerOur position
R-01MandatorySubmit through the procurement portal by 12:00 on Friday 4 December 2026.
01-invitation-to-tender.docx›2.1 Timetable
Bid managerNoted
R-02MandatoryPublic liability insurance of at least £10 million per claim; certificate with the tender.
01-invitation-to-tender.docx›4.3 Insurance
FinanceCertificate on file
R-03MandatoryAttend the site visit on Thursday 19 November, 10:00; at most two people; register by 17 November.
03-supplier-briefing.pptx›Slide 6: Site visit
Bid managerRegister by Tue 17 Nov
R-04MandatoryRoutine cleaning of public areas completed between 23:30 and 05:00.
02-service-specification.docx›3.1 Passenger terminal
OperationsCompliant
R-05MandatoryAttend spillages in public areas within 15 minutes at any hour the terminal is open.
02-service-specification.docx›3.4 Response times
OperationsGap: day cover
R-06MandatoryStaff in the restricted area hold a port security pass before their first shift; vetting at our cost.
02-service-specification.docx›5.2 Security passes
HRPlan vetting lead time
R-07MandatoryDivert at least 70 % of waste by weight from landfill; monthly weight report by stream.
02-service-specification.docx›7.1 Waste
OperationsCompliant
R-08ScoredQuality 60 %, price 40 %; a score of 0 or 1 on any method statement excludes the tender.
03-supplier-briefing.pptx›Slide 9: Evaluation
Bid managerNoted
R-09MandatoryEnter a rate in every line of the schedule of rates; a blank or zero rate is non-compliant.
04-pricing-schedule.xlsx›Instructions
FinancePricing in progress
—UnreadNot covered: this file could not be converted, so nothing in it is on the list.
05-site-plans.doc›Legacy Word (.doc) files are not supported: save the file as DOCX first.
Bid managerAsk the buyer

Who does what. The conversion to Markdown is the API. Reading the Markdown and writing these rows is the team's own LLM step, and a bid manager reviews every row against its source before the list is used.

Export to the bid trackerOpen sources

Highlighted values are read from the API response. The data is a sample in the API's real output shape; names and figures are illustrative.

Call

The call behind it

One request with this input produces the 5 records the screen above is drawn from. Prices are the ones on the API page; records that fail or come back empty are not charged.

Input · POST /v2/actors/sfoln~document-to-markdown/run-sync-get-dataset-items
{
  "documentUrls": [
    "https://files.calderwren.example/tenders/eht-2026-041/01-invitation-to-tender.docx",
    "https://files.calderwren.example/tenders/eht-2026-041/02-service-specification.docx",
    "https://files.calderwren.example/tenders/eht-2026-041/03-supplier-briefing.pptx",
    "https://files.calderwren.example/tenders/eht-2026-041/04-pricing-schedule.xlsx",
    "https://files.calderwren.example/tenders/eht-2026-041/05-site-plans.doc"
  ],
  "includeSections": true
}
First record of 5
Response · record 1 of 5 · sample data
{
  "input": "https://files.calderwren.example/tenders/eht-2026-041/01-invitation-to-tender.docx",
  "status": "ok",
  "charged": true,
  "chargedEvent": "document",
  "source": "document-converter",
  "fetchedAt": "2026-11-09T10:14:21.000Z",
  "url": "https://files.calderwren.example/tenders/eht-2026-041/01-invitation-to-tender.docx",
  "fileName": "01-invitation-to-tender.docx",
  "fileSizeBytes": 84312,
  "sha256": "7e24655acab317dcd7c74d143bb7c28ef408983324e27c86fb5b5671d8c26954",
  "format": "docx",
  "language": "en",
  "markdownUrl": null,
  "tablesUrl": null,
  "truncated": false,
  "truncation": [],
  "title": "Invitation to Tender EHT-2026-041",
  "metadata": {
    "title": "Invitation to Tender EHT-2026-041",
    "author": "Procurement Office",
    "subject": null,
    "description": null,
    "keywords": [],
    "language": "en-GB",
    "publisher": null,
    "createdAt": "2026-10-21T09:12:00.000Z",
    "modifiedAt": "2026-11-06T16:40:00.000Z"
  },
  "pageCount": 8,
  "rowCount": 0,
  "wordCount": 3610,
  "charCount": 22940,
  "markdown": "# Invitation to Tender EHT-2026-041\n\nCleaning and waste services, passenger terminal and offices\n\n## 1 Introduction\n\nEasthaven Harbour Trust invites tenders for cleaning and waste services at its passenger terminal and harbour offices for three years from 1 March 2027. …\n\n## 2 Timetable and submission\n\n### 2.1 Timetable\n\nTenders **must** be submitted through the procurement portal by 12:00 on Friday 4 December 2026. Late tenders are not opened. …\n\n## 4 Conditions of participation\n\n### 4.3 Insurance\n\nThe bidder **must** hold public liability insurance of at least £10 million per claim and provide the certificate with the tender. …",
  "sections": [],
  "tables": [],
  "billedBlocks": 1,
  "overageCharged": 0
}
Charged eventCountPriceTotal
Converted document
document
4$0.003$0.012
Overage block (20 pages or 10k rows)
document-overage
1$0.0007$0.0007
This run$0.0127

Fields

Which output fields do the work

Output fieldUsed for
markdownThe text the LLM step reads. Word headings stay headings, so a requirement can be cited by section number and title.
sectionsDecks and workbooks arrive in parts: one entry per slide (with notes) or sheet, each small enough for one extraction prompt and named in the checklist's source column.
tablesSheet names, columns and row counts of the pricing workbook; with includeRows the rows come as JSON for the pricing model.
fileName format title metadataFile list of the tender and the source column of the checklist; format is detected from the file itself, not its extension.
pageCount rowCount wordCountSize of each file in the list, and how the extraction step sizes its prompts.
status errorA file that cannot be converted becomes an open item on the checklist instead of being skipped silently.
billedBlocks overageCharged truncatedShows when a long file was billed as more than one block and confirms nothing was cut.

All output fields are listed on the API page.

Build

Build it

Convert the pack in one call, then hand each document to your own extraction step part by part. extractRequirements is your LLM call with your prompt; it is not part of the API.

Node.js · folder trigger
const res = await fetch('https://api.apify.com/v2/actors/sfoln~document-to-markdown/run-sync-get-dataset-items', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.APIFY_TOKEN}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ documentUrls: signedUrls, includeSections: true }),
});

const checklist = [];
for (const doc of await res.json()) {
  if (doc.status !== 'ok') { checklist.push({ type: 'Unread', source: doc.fileName, text: doc.error.message }); continue; }

  // Decks and workbooks come in sections; Word files are split at their second-level headings.
  const parts = doc.sections.length
    ? doc.sections.map((s) => ({ where: `${s.type} ${s.index}: ${s.title}`, text: s.markdown }))
    : doc.markdown.split(/\n(?=## )/).map((text) => ({ where: text.match(/^## (.*)/)?.[1] ?? doc.title, text }));

  for (const part of parts) {
    const found = await extractRequirements(part.text); // your model, your prompt
    checklist.push(...found.map((r) => ({ ...r, source: `${doc.fileName} › ${r.heading ?? part.where}` })));
  }
}
await bidTracker.saveDraft(tenderId, checklist);
  • Legacy .doc and .ppt files and password-protected Office files are not converted; ask the buyer for DOCX, PPTX or PDF.
  • Text is converted, not rendered: images, charts and drawings are left out, so site plans and diagrams still need a person.
  • Scanned PDFs have no text layer; the record lists them under scannedPages so they can go to an OCR step.

Authentication, the MCP endpoint and the asynchronous variant are on the API page.

More

Other things teams build with it

  • Contract review: clause extraction from Word agreements with section references
  • Loading board packs and policy documents into a searchable knowledge base
  • Supplier price lists in Excel turned into JSON rows for a comparison
  • Course material from slides and e-books prepared for a tutoring assistant

All demos · Document to Markdown – DOCX, PPTX, XLSX: prices, input and output · /actors/document-to-markdown.json carries this demo as demo