PranavNagrecha/AwesomeSalesforceSkills / skills/admin/email-service-inbound
email-service-inbound
VerifiedInbound email processing in Salesforce via Email Services + the `Messaging.InboundEmailHandler` Apex interface. Covers EmailService configuration (running user, accept-from address, attachment handling, error / failure routing), the EmailServicesAddress per-routing-address pattern, the handler's `Messaging.InboundEmail` payload (text body, HTML body, headers, attachments, in-reply-to threading), and the canonical Email-to-Case alternative for case creation. NOT for outbound email (use admin/email-templates-and-alerts), NOT for Email-to-Case flow customization itself (use admin/email-to-case-configuration). Trigger keywords: EmailServicesFunction, EmailServicesAddress, runAsUser, localPart, EmailDomainName, attachmentOption, overLimitAction, errorRoutingAddress, routing address, inbound email limit.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 26.5 KB |
| references/examples.md | markdown | 7.0 KB |
| references/gotchas.md | markdown | 15.3 KB |
| references/llm-anti-patterns.md | markdown | 7.4 KB |
| references/metadata-examples.md | markdown | 16.7 KB |
| references/well-architected.md | markdown | 7.1 KB |
| scripts/check_email_service_inbound.pyexecutable | script | 15.4 KB |
| templates/email-service-inbound-template.md | markdown | 2.5 KB |
templates/email-service-inbound-template.md
View on GitHub# Email Service Inbound — Work Template
Fill this in while working an inbound-email request. Every heading below
maps to a decision the `EmailServicesFunction` / `EmailServicesAddress`
metadata records, so an incomplete section here becomes a guessed XML
element later.
## Scope
**Skill:** `email-service-inbound`
**Request summary:** _(what the user asked for, in their words)_
## Context Gathered
Answers to `## Questions to Ask Before Configuring` in SKILL.md.
| Decision | Answer | Metadata element it sets |
|---|---|---|
| Record(s) the email must produce | | `apexClass` |
| Running user (username) and its permission set | | `emailServicesAddresses/runAsUser` |
| Sender population (named senders / domains / anonymous) | | `authorizedSenders`, `authorizationFailureAction` |
| SPF/DKIM/DMARC enforcement required? | | `isAuthenticationRequired`, `authenticationFailureAction` |
| Attachment policy (discard / metadata only / text / binary / all) | | `attachmentOption`, `isTextAttachmentsAsBinary` |
| Who is paged when processing fails | | `isErrorRoutingEnabled`, `errorRoutingAddress` |
| Behaviour at the daily org email-processing limit | | `overLimitAction` |
| Behaviour while the service is inactive (cutover, incident) | | `functionInactiveAction` |
| Threading source (`messageId` / `inReplyTo` / subject token / none) | | handler logic |
| Expected volume (emails/day) vs org limit (user licences x 1,000, max 1,000,000) | | capacity note |
## Approach
- Pattern selected from SKILL.md `## Common Patterns`: _(A / B / C, and why)_
- Rejected alternative and reason (usually: why not Email-to-Case):
- Async boundary: does the handler publish a Platform Event instead of
doing callouts inline? _(yes/no + event name)_
## Artifacts Produced
- [ ] `force-app/main/default/classes/<Handler>.cls`
- [ ] `force-app/main/default/classes/<Handler>Test.cls`
- [ ] `force-app/main/default/emailservices/<Function_Name>.emailservices-meta.xml`
- [ ] `manifest/package.xml` entries for `ApexClass` and `EmailServicesFunction`
- [ ] Documented permission set for the running user
## Checklist
Copy `## Review Checklist` from SKILL.md and tick each line. Then run:
```bash
python3 skills/admin/email-service-inbound/scripts/check_email_service_inbound.py \
--manifest-dir force-app/main/default
```
## Notes
Record deviations from the patterns in SKILL.md and the reason, plus the
production routing address once it exists (it is generated per org and
cannot be moved from sandbox — see `references/gotchas.md` § 12).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |