Flow Name: On Platform Event: Send email¶
Last Updated: 2025-08-25 Source Code: On_Platform_Event_Send_email.flow-meta.xml
API Name: On_Platform_Event_Send_email Status: Active Type: Custom Trigger: Platform Event Send_Email__e
Business Purpose¶
Provides asynchronous email sending capability triggered by platform events. Enables decoupled email processing by allowing other flows and processes to publish email requests via platform events.
Process Flow¶
- Platform Event Reception: Listens for Send_Email__e platform events
- Email Action: Executes emailSimple action with:
- Sender: Org-Wide Email Address (project.aanp@integrate2cloud.com)
- Recipient: Retrieved from event's RecipientId__c field
- Template: Retrieved from event's TemplateId__c field
- Related Record: Retrieved from event's OrderId__c field
📊 Click to view Process Flow Diagram
flowchart TD
Start([Start: Platform Event Send_Email__e]) --> Check{Entry Criteria<br/>Met?}
Check -->|No| End([End])
Check -->|Yes| Process[Execute Business Logic]
Process --> Update[Update Records]
Update --> End
style Start fill:#e1f5ff
style Check fill:#fff4e1
style Process fill:#e1ffe1
style Update fill:#ffe1e1
style End fill:#e1f5ff
Key Business Rules¶
- Uses DefaultWorkflowUser context for email sending
- Requires org-wide email address configuration for project.aanp@integrate2cloud.com
- Email template and recipient must be specified in platform event
- Related record context provided through OrderId field
- Synchronous email processing within current transaction
Dependencies¶
- Send_Email__e platform event object with fields: RecipientId__c, TemplateId__c, OrderId__c
- Org-wide email address: project.aanp@integrate2cloud.com
- Valid email templates accessible by system
- Valid recipient IDs (User, Contact, or Lead records)
Changes¶
No specific PR references found in flow description
⚠️ Pre-Go-Live Concerns¶
CRITICAL - Fix Before Go-Live¶
- Org-Wide Email Address: Verify project.aanp@integrate2cloud.com is configured and deliverable in production
- Email Template Validation: No validation if template ID exists or is accessible
HIGH - Address Soon After Go-Live¶
- Error Handling: No error handling for failed email sends or invalid recipients
- Email Limits: Could hit daily email limits if many platform events trigger emails
- Template Access: Email templates must be accessible by system/DefaultWorkflowUser
MEDIUM - Future Enhancement¶
- Add error handling and retry logic for failed email attempts
- Implement email limit monitoring and queuing
- Add logging for sent emails and delivery status
- Consider adding email validation before sending
LOW - Monitor¶
- Platform event consumption performance with high volume
- Email delivery rates and bounce handling
- Template usage patterns and potential template changes
Maintenance Notes¶
Simple flow design but critical for email functionality. Monitor for email delivery failures and ensure org-wide email address remains valid. Consider implementing email audit trail if business requires delivery confirmation.