Overview
What Extract Email Addresses does
Finds conventional email addresses, removes case-insensitive duplicates, and returns one address per line without sending the selection anywhere.
| Category | Extraction |
|---|---|
| Action type | JavaScript |
| Default result | Copy the result |
| Internet | Not required |
Example
Action and outcome
| Action | Outcome |
|---|---|
| Extract Email AddressesSelected text: Email Maya@example.com or support@actionclip.app; maya@example.com is the same contact. | Maya@example.com support@actionclip.app |
Workflow
Use Extract Email Addresses
Follow these steps to extract unique email addresses from selected text with ActionClip.
- Select the text you want to use.
- Choose Extract Email Addresses from ActionClip.
- Review the extracted result, then copy it where you need it.
Before you add it
Requirements and privacy
- Before you start: No setup required.
- Your selected text: Runs locally in ActionClip’s JavaScript sandbox. Selected text does not leave your Mac.
Inspect before installing
Action script
The script below is included so you can inspect how the action works before downloading it.
JavaScript definition
function run(selected_text) {
const matches = selected_text.match(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi) || [];
const seen = new Set();
const emails = [];
matches.forEach((email) => {
const key = email.toLowerCase();
if (!seen.has(key)) {
seen.add(key);
emails.push(email);
}
});
return emails.length ? emails.join("\n") : "No email addresses found.";
}