FlowRunner
PricingContact
Theme
Start Free

Map file extensions to MIME types and back, entirely offline with no API key or external call. Agents set the correct content type before a file moves between systems that care about it.

5 actions No credentials available
Platform Documentation ↗ Capability data verified 2026-08-01
A supplier uploads a document to the intake portal
Agent resolves the declared type from the filename with Get MIME Type
Agent reads the first bytes of the file with Detect File Type to find what it actually is
Agent compares the detected type against the allow-list for this intake channel
Agent sets the correct Content-Type header and forwards the file to the document processor
When the bytes and the extension disagree, the intake owner decides whether to process, reject or return the file

What This Integration Enables

MIME Tools maps file extensions to media types and back inside FlowRunner, with an embedded table of 331 types drawn from the IANA Media Types registry and cross-checked against the mime-db mapping. There is no API key, no account and no external call for the lookup work, which means a file-handling flow has no credential to manage and no vendor lookup to wait on in a path that already involves moving bytes. Content type is the handshake between two systems that will not tell you they disagree: an upload API that rejects application/octet-stream, a document processor that branches on type, a browser that decides whether to render or download. The connector resolves that type from a filename, path, URL or bare extension, performs the reverse lookup from a type back to its canonical extension, reports whether a type is text based and whether it is worth compressing, and reads a file's real type from its magic bytes so a mislabelled or extensionless file is still recognised. That last capability is the one that turns a naming convention into a verification step.

Without FlowRunner

Generic octet-stream Files arrive at the next API with no usable type and get rejected
Extension taken on trust A file called invoice.pdf is assumed to be a PDF because of five characters
Downloads named badly A file pulled from an HTTP response is saved without a usable extension

With FlowRunner

Correct header every time The Content-Type is resolved from a registry table before the file moves
Bytes checked, not names The real format is read from the file's own signature and compared to its label
Names derived from the type A downloaded file gets the canonical extension for the type the server declared

Use Case Scenarios

Uploads that the receiving API will actually accept

An agent takes documents from a supplier intake mailbox and pushes them into a document processor whose API rejects anything sent as application/octet-stream. Before each upload the agent calls Get MIME Type on the filename, which strips query strings and fragments and matches case-insensitively, and uses the ready-to-use Content-Type header value the action returns. Unknown extensions never throw: the response reports found as false and falls back to a type the flow can branch on, so an unrecognised attachment produces a routing decision instead of a failed run. The processed output is filed in S3.

Naming a download correctly from its response header

A flow pulls report files from a partner endpoint that serves them with no filename and no extension in the URL. The agent takes the Content-Type from the response, calls Get Extensions for MIME Type, and names the stored file with the canonical extension. Media type parameters are ignored, so text/html; charset=utf-8 resolves the same as text/html, and common aliases are normalized first, so image/x-icon and application/javascript both land on their modern equivalents. The named file is written to Google Drive where the finance team can open it without renaming anything.

Deciding what is worth compressing

An archival flow moves several thousand files a night into cold storage. Before each transfer the agent calls Check MIME Type, which reports whether the type is text based and whether it is worth compressing. Archives, PDFs, media files, web fonts and the ZIP-backed Office and OpenDocument formats are flagged as already compressed and are passed through untouched, while genuinely uncompressed formats such as BMP, WAV, TIFF and TTF are compressed on the way. The flow stops burning execution time recompressing things that cannot get smaller.

Human-in-Loop Highlight

The gate is the disagreement between what a file says it is and what it is. Detect File Type downloads the first 8 KB of a file, matches it against roughly fifty byte signatures, refines ZIP containers into DOCX, XLSX, PPTX, ODF, EPUB, APK and JAR, and always states which source produced the answer and whether the bytes and the extension agree. When they do not agree, neither of the two automatic responses is safe. Renaming the file to its detected type and carrying on means a flow just accepted something a person deliberately mislabelled. Rejecting outright means a legitimate DOCX, which is genuinely a ZIP container underneath, gets bounced back to a supplier who did nothing wrong. So the agent quarantines the file and asks the intake owner in Slack: "quarterly-return.pdf from supplier 2214 has a ZIP signature, refined to no known Office format. Bytes and extension disagree. Process as the detected type, reject and notify the supplier, or hold for review?" One person, one message, one decision, and no untrusted file moves further into the estate on the strength of five characters after a dot. This is where a connector stops being plumbing and becomes a control.

Agent processes routinely
Detects File Type downloads the first 8 KB of a file
Clear match Continues automatically
Ambiguous Routes to human via Slack
Human decides
Agent resumes with decision

Agent Capabilities

5 actions

MIME Types

4
  • Get MIME Type Resolves the media type for a filename, full path, URL or bare extension, matching case-insensitively and stripping query strings and fragments. Returns the media type with its canonical extension, every extension registered for it, whether it is text based, whether it is worth compressing, and a ready-to-use Content-Type header value. Unknown extensions never throw: the response reports found as false and falls back to application/octet-stream or a supplied fallback type.
  • Get Extensions for MIME Type Performs the reverse lookup, returning a type's canonical extension plus every other extension registered for it. Media type parameters are ignored and common aliases are normalized first. Used to name a downloaded file correctly from a Content-Type response header. Unknown types return found as false with a null extension rather than throwing.
  • Check MIME Type Reports whether a type is text based and whether it is worth compressing before transfer or storage. Text detection covers the whole text tree, structured suffixes and named exceptions such as application/json and image/svg+xml. Compressibility flags already-compressed payloads including archives, PDFs, media files, web fonts and ZIP-backed office documents. Also returns the type's category and the charset to use for text payloads.
  • List MIME Types Returns the built-in media type table, optionally narrowed to one category and filtered by a free-text query that matches the media type and every extension. Each entry carries its canonical extension, all registered extensions and the text and compressibility flags. Used to populate pickers, validate a batch of uploads, or build an allow-list of accepted upload types.

File Detection

1
  • Detect File Type Downloads the first 8 KB of a FlowRunner file or public URL and identifies its real media type from its magic bytes, so a mislabelled or extensionless file is still recognised. Signatures cover the common image, audio, video, font, archive, document, executable and data formats, and ZIP containers are refined into DOCX, XLSX, PPTX, ODF, EPUB, APK and JAR. When no signature matches, or when the bytes only reveal a generic container, the file extension is used instead. The response always states which source produced the answer and whether the bytes and the extension agree.

Frequently Asked Questions

What can FlowRunner do with MIME Tools?

FlowRunner agents can run Get MIME Type, Get Extensions for MIME Type, and Check MIME Type in MIME Tools, plus 2 more actions.

Does connecting MIME Tools to FlowRunner require OAuth?

No. MIME Tools needs no credentials at all, so there is no key to obtain, store, or rotate.

Can MIME Tools trigger a FlowRunner workflow automatically?

MIME Tools doesn't currently expose triggers in FlowRunner. It connects as an action step inside workflows started by another trigger.

Start building with MIME Tools

$100 in credits. No card required. Connect in minutes.