# Stech Presence Driven Email Transformer (SPDET) (`stech_ai/stech-presence-driven-email-transformer-spdet`) Actor

SPDET is a Single-Purpose AI (SPAI) Actor on the Apify Store that transforms cold, robotic, or overly formal emails into truthful while sounding warm, respectful, and professional. useful for Job rejection emails, Customer apologies, Proposal declines, Delay notifications
Formal follow-ups.

- **URL**: https://apify.com/stech\_ai/stech-presence-driven-email-transformer-spdet.md
- **Developed by:** [Stech AI](https://apify.com/stech_ai) (community)
- **Categories:** AI, Agents, Open source
- **Stats:** 2 total users, 1 monthly users, 96.4% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 events

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

<div align="center"><img width="300" height="300" alt="584325247-47a61f20-0f15-4904-8961-f24321100ac5" src="https://github.com/user-attachments/assets/a2564306-ad9b-464d-9a8f-01864b36d22e" /></div>

## Stech Presence-Driven Email Transformer (SPDET)
### Transform Difficult Emails into Warm, Honest, and Professional Messages — at Scale

SPDET is a Single-Purpose AI (SPAI) Actor on the Apify Store that transforms cold, robotic, or overly formal emails into messages that remain truthful while sounding warm, respectful, and professional.

It is especially useful for sensitive communications such as:

- Job rejection emails
- Customer apologies
- Proposal declines
- Delay notifications
- Formal follow-ups

SPDET can process one email or hundreds in a single run. Each email is refined individually and returned as structured JSON, with optional downloadable DOCX and PDF files.

> **SPDET helps organizations communicate difficult messages with dignity.**

> **Unlike generic writing assistants, SPDET returns structured outputs and ready-to-download documents for immediate operational use.**

---


### 🎯 Who SPDET Is For
SPDET is designed for professionals and organizations that need to send large volumes of emails without sacrificing human warmth.
#### HR & Recruitment
Send rejection emails that acknowledge the candidate's effort and help preserve employer brand.
#### Customer Support
Turn template-based replies into responses that feel more considerate and professional.
#### Operations Teams
Standardize outbound communications across departments.
#### Sales & Consulting
Decline proposals and follow up with tact and clarity.
#### Developers & Automation Builders
Use SPDET as a component in workflows built with n8n, Make, Zapier, or custom applications.


---

### 📣 Why SPDET Matters

Many organizations automate email communication to save time. However, speed often comes at the cost of human connection.
A message such as:
> "Dear applicant, we regret to inform you that your application has been rejected."
may be accurate, but it can feel cold and impersonal.


SPDET transforms the same message into something more respectful:
> "Thank you for considering our opportunity. Although we will not be moving forward at this time, we appreciate your interest and wish you the best in your future endeavors."
The decision remains unchanged.
The tone becomes more human.

---

### ⚙️ Two Ways to Use SPDET

| As a Standalone Tool | As a Workflow Component |
|----------------------|-------------------------|
| Upload CSV or JSON and process emails in batches. | Integrate SPDET into automated workflows and AI agents. |
| Best for HR teams and non-technical users. | Best for developers and operations teams. |
| No coding required. | Works with APIs and automation platforms. |

---

### 🚀 Key Features

- Warm and honest transformation — preserves the original meaning while improving tone.
- Batch processing — process 1 to 100+ emails in a single run.
- Flexible input — CSV upload or JSON array.
- Structured JSON output — ideal for automation and database storage.
- DOCX and PDF generation — ready-to-send documents for each email.
- Audit hash — each output includes a SHA-256 fingerprint to support traceability.
- Personalization — use recipient and sender names automatically.
- Error tolerance — failed rows do not stop the batch.
- Stateless processing — email content is processed and not retained by SPDET.
- Automation-ready — works seamlessly with Apify integrations.

---

### 📄 Output Formats

SPDET generates multiple output formats in a single run.

| Format | Purpose |
|--------|---------|
| JSON | API integrations and automated workflows |
| CSV | Spreadsheet review and batch export |
| DOCX | Editable documents |
| PDF | Finalized and archival copies |

> **JSON is the primary output for automation. CSV, DOCX, and PDF are supporting formats for operational use.**

---

### 📥 Input Fields

| Field | Required | Description |
|-------|:--------:|-------------|
| `originalEmail` | Yes | The email text to improve |
| `additionalInstructions` | No | Extra guidance for tone or content |
| `originalSubject` | No | Subject line retained unchanged |
| `recipientName` | No | Used in the greeting |
| `senderName` | No | Used in the signature |
| `recipientEmail` | No | Passed through for integration purposes |

---

### 📤 Example Output

```json
[
  {
    "originalEmail": "Dear applicant, we regret to inform you that your application has been rejected.",
    "improvedEmail": "Dear John,\n\nThank you for considering our opportunity. Although we appreciate your interest, we regret to inform you that your application has been rejected at this time. We encourage you to keep pursuing your goals and wish you the best in your future endeavors.\n\nBest regards,\nHR Team",
    "status": "success",
    "timestamp": "2026-05-13T16:17:17.637Z",
    "auditHash": "25849c7bcb00a34d9a72a038373000eae124a468f470ae427e52275c237114ff",
    "download_docx": "https://api.apify.com/...",
    "download_pdf": "https://api.apify.com/...",
    "originalSubject": "Application Status",
    "recipientName": "John",
    "senderName": "HR Team",
    "recipientEmail": "john@example.com"
  }
]
````

***

### 🧪 Example Workflow (HR Team)

1. Export rejected candidates from your ATS.
2. Upload the CSV to SPDET.
3. Run the Actor.
4. Download the results.
5. Send the improved emails.

What once took hours of rewriting can be completed in minutes.

***

### 🔌 Integrations

As a published Apify Actor, SPDET can be used with:

- n8n
- Make
- Zapier
- Gmail
- Google Drive
- Slack
- Custom applications via the Apify API

Users connect their own accounts and control their own workflows.

***

### ❗ Important Notes

- Always review the generated email before sending.
- SPDET improves language and tone; it does not provide legal, financial, or medical advice.
- `auditHash` supports traceability and internal audit workflows but is not a certification of regulatory compliance.
- Files remain available in your Apify run outputs until you delete them.

***

### 💼 Business Value

Organizations use SPDET to:

- Preserve employer brand
- Improve candidate and customer experience
- Standardize communication quality
- Reduce manual rewriting
- Automate sensitive messaging

***

### 📄 License

All rights reserved under the Stech Commercial License (SCL) v2.1.

***

Stech helps organizations deliver difficult messages with warmth, honesty, and professionalism.

> **Professional communication should be efficient, but it should never feel empty.**

***

Stech – honest, warm, and never pretends to be human. 😊🌿

# Actor input Schema

## `csvFile` (type: `string`):

Upload a CSV file. You can use your existing company CSV without renaming columns. If you use dynamic mapping, provide columnMapping and rejectionTemplate.

## `emails` (type: `array`):

Alternative to CSV: provide an array of email objects. All personalization fields are optional.

## `columnMapping` (type: `object`):

Map placeholders to CSV column names. Example: { "name": "Full Name", "position": "Job Title" }

## `rejectionTemplate` (type: `string`):

Template with placeholders like {name}, {position}. Required if columnMapping is provided.

## `maxConcurrency` (type: `integer`):

Number of emails to process simultaneously (1-20).

## `timeout` (type: `integer`):

Max wait time per email request.

## Actor input object example

```json
{
  "emails": [
    {
      "originalEmail": "Dear Sir, your application has been rejected.",
      "originalSubject": "Application Status",
      "recipientName": "John",
      "senderName": "HR Team",
      "recipientEmail": "john@example.com"
    }
  ],
  "columnMapping": {},
  "rejectionTemplate": "",
  "maxConcurrency": 5,
  "timeout": 60
}
```

# Actor output Schema

## `originalEmail` (type: `string`):

The original cold email provided by the user.

## `improvedEmail` (type: `string`):

The email rewritten by Stech AI with a warmer, more honest tone.

## `status` (type: `string`):

The success or failure status of the processing (e.g., 'success' or 'error').

## `timestamp` (type: `string`):

The processing timestamp in ISO 8601 format.

## `auditHash` (type: `string`):

SHA-256 hash of originalEmail + improvedEmail + timestamp for audit trail and EU AI Act compliance.

## `download_docx` (type: `string`):

URL to download the improved email as a Microsoft Word (.docx) file.

## `download_pdf` (type: `string`):

URL to download the improved email as a PDF file.

## `originalSubject` (type: `string`):

Original email subject line.

## `recipientName` (type: `string`):

Name of the recipient.

## `senderName` (type: `string`):

Name of the sender.

## `recipientEmail` (type: `string`):

Email address of the recipient.

# 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 = {
    "emails": [
        {
            "originalEmail": "Dear Sir, your application has been rejected.",
            "originalSubject": "Application Status",
            "recipientName": "John",
            "senderName": "HR Team",
            "recipientEmail": "john@example.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("stech_ai/stech-presence-driven-email-transformer-spdet").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 = { "emails": [{
            "originalEmail": "Dear Sir, your application has been rejected.",
            "originalSubject": "Application Status",
            "recipientName": "John",
            "senderName": "HR Team",
            "recipientEmail": "john@example.com",
        }] }

# Run the Actor and wait for it to finish
run = client.actor("stech_ai/stech-presence-driven-email-transformer-spdet").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "emails": [
    {
      "originalEmail": "Dear Sir, your application has been rejected.",
      "originalSubject": "Application Status",
      "recipientName": "John",
      "senderName": "HR Team",
      "recipientEmail": "john@example.com"
    }
  ]
}' |
apify call stech_ai/stech-presence-driven-email-transformer-spdet --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=stech_ai/stech-presence-driven-email-transformer-spdet",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Stech Presence Driven Email Transformer (SPDET)",
        "description": "SPDET is a Single-Purpose AI (SPAI) Actor on the Apify Store that transforms cold, robotic, or overly formal emails into truthful while sounding warm, respectful, and professional. useful for Job rejection emails, Customer apologies, Proposal declines, Delay notifications\nFormal follow-ups.",
        "version": "0.0",
        "x-build-id": "gG9Xd65MOHU0vvAVW"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/stech_ai~stech-presence-driven-email-transformer-spdet/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-stech_ai-stech-presence-driven-email-transformer-spdet",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/stech_ai~stech-presence-driven-email-transformer-spdet/runs": {
            "post": {
                "operationId": "runs-sync-stech_ai-stech-presence-driven-email-transformer-spdet",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/stech_ai~stech-presence-driven-email-transformer-spdet/run-sync": {
            "post": {
                "operationId": "run-sync-stech_ai-stech-presence-driven-email-transformer-spdet",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "csvFile": {
                        "title": "CSV File (optional)",
                        "type": "string",
                        "description": "Upload a CSV file. You can use your existing company CSV without renaming columns. If you use dynamic mapping, provide columnMapping and rejectionTemplate."
                    },
                    "emails": {
                        "title": "Emails Array (optional)",
                        "type": "array",
                        "description": "Alternative to CSV: provide an array of email objects. All personalization fields are optional.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "originalEmail": {
                                    "type": "string",
                                    "title": "Original Email",
                                    "description": "The email content you want to rewrite."
                                },
                                "originalSubject": {
                                    "type": "string",
                                    "title": "Original Subject (optional)",
                                    "description": "Original email subject line. Never changed by SPDET. Included for reference and ATS compatibility."
                                },
                                "recipientName": {
                                    "type": "string",
                                    "title": "Recipient Name (optional)",
                                    "description": "Name of the recipient for personalization. SPDET also recognizes: recipient, name, recipient_name."
                                },
                                "senderName": {
                                    "type": "string",
                                    "title": "Sender Name (optional)",
                                    "description": "Name of the sender to sign the email. SPDET also recognizes: sender, sender_name."
                                },
                                "recipientEmail": {
                                    "type": "string",
                                    "title": "Recipient Email (optional)",
                                    "description": "Recipient's email address. SPDET also recognizes: email, recipient_email. Carried through to output for ATS compatibility."
                                }
                            },
                            "required": [
                                "originalEmail"
                            ]
                        }
                    },
                    "columnMapping": {
                        "title": "Column Mapping (for CSV)",
                        "type": "object",
                        "description": "Map placeholders to CSV column names. Example: { \"name\": \"Full Name\", \"position\": \"Job Title\" }",
                        "default": {}
                    },
                    "rejectionTemplate": {
                        "title": "Rejection Template (for CSV)",
                        "type": "string",
                        "description": "Template with placeholders like {name}, {position}. Required if columnMapping is provided.",
                        "default": ""
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Number of emails to process simultaneously (1-20).",
                        "default": 5
                    },
                    "timeout": {
                        "title": "Timeout (seconds)",
                        "minimum": 10,
                        "maximum": 300,
                        "type": "integer",
                        "description": "Max wait time per email request.",
                        "default": 60
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
