Skills/Email Extraction/Extract from an email

Extract from an email

Free

Takes an email body (HTML and/or plain text) and returns just the new or relevant content as a verbatim slice of the input, with the quoted thread and reply history removed. Also returns a structured breakdown (new, quoted, and attribution spans) with offsets into the original, the method used, and a truncated flag. Prefer sending HTML when you have it (structural quoting is the strongest signal). Detection is biased to keep more, so an ambiguous message is returned in full rather than over-stripped.

Use when

You have a raw email body and want just the new/relevant part, with the full thread removed.

Not for

Summarizing or rewriting the email, or fetching it from Gmail/Outlook (you pass the body in).

Cost

Free

Free to use. Fair-use rate limits apply.

What it accepts

Set these inside the intent when you run it.

htmloptional

The email's HTML body. Preferred when present. Provide at least one of html or text.

textoptional

The email's plain-text body. Used when no HTML is provided.

content_typeoptional

Optional hint, "text/html" or "text/plain". HTML is used whenever present regardless.

headersoptional

Optional message headers (from, date) to aid attribution detection.

policyoptional

Optional cut policy. Set pre_stripped when you already have a provider unique body.

What you get back

The cleaned body (verbatim), its format, the method used, a truncated flag, a version string, and new/quoted/attribution offsets into the input.

Run it

Run this sub-skill directly: pin it with operation and pass its inputs in the intent. (Omit operation and the Email Extraction skill will route from your intent instead.)

curl -X POST "https://skill.askfaro.com/skills/email-extraction/run" \
  -H "Authorization: Bearer $FARO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"intent":{"operation":"extract","html":"<div>Thanks, that works.</div><blockquote>...</blockquote>","text":"Yes, 3pm works.\n\nOn Mon, Jun 1, 2026 Bob wrote:\n> Can we meet at 3pm?\n","content_type":"text/html","headers":"{\"from\": \"bob@example.com\", \"date\": \"Mon, 1 Jun 2026 09:00:00 +0000\"}","policy":"{\"max_chars\": 4000, \"pre_stripped\": false}"}}'

Example requests

  • Strip the quoted history from this email and return just the new reply.
  • Extract the new content from this email thread.
  • Remove the reply chain so I only keep what was just written.