# Email Template Package QC (`immemorial_sarinda/email-template-package-qc`) Actor

Check a supplied synthetic email template package for MIME structure, declared placeholders and content references. Get one complete deterministic JSON report. Restricted offline profile; no sending, inbox access or live rendering.

- **URL**: https://apify.com/immemorial_sarinda/email-template-package-qc.md
- **Developed by:** [Picknotes](https://apify.com/immemorial_sarinda) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$100.00 / 1,000 completed reports

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

## Email Template Package QC

Check a synthetic email template package for supported MIME structure, content-ID references and literal merge-field coverage. Receive one complete machine-readable report containing parts, references, field occurrences, findings, summary counts and input/report hashes.

USD 0.10 per completed report, including platform usage. A completed report can contain errors or warnings: completion means the supported checks finished, not that the template passed. Unsupported or incomplete packages do not produce a completed-report dataset item. If a run stops after its dataset append was attempted, delivery and billing may be uncertain; inspect the dataset and run details before considering another run.

### Try the demo

Use the default input:

```json
{"useDemo":true}
```

The included synthetic package exercises the checks without supplying your own data. Omit templateBundleJson. Leave authorizedNonpersonalNonconfidentialData absent or false in demo mode.

### Check your own synthetic package

Set useDemo to false and authorizedNonpersonalNonconfidentialData to true. Supply templateBundleJson as a string containing the exact native JSON bundle. The two native attestations are also required; the service does not inject them.

```json
{
  "useDemo": false,
  "authorizedNonpersonalNonconfidentialData": true,
  "templateBundleJson": "{\"schemaVersion\":\"n32-input/1\",\"syntheticTemplateOnly\":true,\"authorizedToProcess\":true,\"template\":\"MIME-Version:1.0\\r\\nContent-Type:text/plain;charset=utf-8\\r\\n\\r\\nHello {{name}}\",\"namedFields\":[\"name\"]}"
}
```

Only submit authorized, nonpersonal, nonconfidential synthetic data. Do not submit real messages, customer contact lists, credentials or private business content. Apify stores the input before execution. These attestations do not anonymize data or detect every secret or personal identifier. The service performs no network retrieval, inbox access or email sending.

Preserve CRLF line endings inside the template using JSON escapes. Do not add a byte-order mark, extra envelope fields, duplicate JSON keys or remote URLs in place of the bundle. templateBundleJson is at most 2,200,000 UTF-8 bytes; the outer input is at most 4,500,000 bytes. The MIME template is at most 1 MiB, with at most 50 parts, depth 8, 100 declared fields, 1,000 CID references and 1 MiB total decoded payload. Runtime checks enforce byte and structure limits.

### Get the complete report

Open the output dataset and download the raw full JSON items. The table is a preview; reportJson contains the entire native report as a JSON string. Do not copy a truncated table cell or select a shortened subset of fields.

For a local JSON download named dataset.json, this Python 3 snippet verifies the exact report bytes and saves report.json:

```python
import hashlib, json
from pathlib import Path
items = json.loads(Path("dataset.json").read_text(encoding="utf-8"))
assert isinstance(items, list) and len(items) == 1
item = items[0]
raw = item["reportJson"].encode("utf-8")
assert len(raw) == item["reportBytes"]
assert hashlib.sha256(raw).hexdigest() == item["reportSha256"]
report = json.loads(raw)
assert report["status"] == "complete"
assert report["eligibleForCompleteReport"] is True
Path("report.json").write_bytes(raw)
```

Keep the deliveryKey, reportSha256 and receipt with the report. Hash checks detect accidental corruption; they do not establish source authenticity or payment settlement. Receipt settlementStatus=not_verified and native pricing/charged fields are report metadata, not a billing ledger. Check the platform run details for actual billing.

### What the checks cover

The narrow supported profile covers text/plain and text/html bodies, supported image attachments, selected multipart structures, 7bit/8bit/base64/quoted-printable decoding, message-global case-sensitive CID matching and literal {{field}} tokens. Findings include missing or ambiguous CID targets, undeclared or missing fields, plain/HTML coverage differences and empty text bodies. Complete reports can contain findings that require attention.

This is not full MIME or HTML standards validation, email rendering, inbox placement testing, deliverability certification, malware scanning, archive extraction, attachment execution or rights verification. It does not evaluate template expressions or guarantee that alternate parts render alike. Unsupported MIME, HTML, charset, encoding or merge syntax may make a package incomplete. Input and output are bounded; no automatic repost or retry occurs after an uncertain append.

# Actor input Schema

## `authorizedNonpersonalNonconfidentialData` (type: `boolean`):

Required as true for own-input mode. Confirm you are authorized to submit these nonpersonal, nonconfidential synthetic templates.

## `templateBundleJson` (type: `string`):

Own mode only. Exact native n32-input/1 JSON text with syntheticTemplateOnly=true, authorizedToProcess=true, template and namedFields. Maximum 2,200,000 UTF-8 bytes; no trimming or injected fields. Omit in demo mode.

## `useDemo` (type: `boolean`):

Use the included synthetic email package. Omit templateBundleJson and leave the own-input authorization absent or false.

## Actor input object example

```json
{
  "authorizedNonpersonalNonconfidentialData": false,
  "useDemo": true
}
```

# 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 = {
    "useDemo": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("immemorial_sarinda/email-template-package-qc").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 = { "useDemo": True }

# Run the Actor and wait for it to finish
run = client.actor("immemorial_sarinda/email-template-package-qc").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 '{
  "useDemo": true
}' |
apify call immemorial_sarinda/email-template-package-qc --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,immemorial_sarinda/email-template-package-qc"
        }
    }
}
```

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/J1b6ktFOcuzzLyTE1/builds/6qx48C5qL0Od8Txi3/openapi.json
