Back to insights
Salesforce AutomationSalesforce FlowEmail Automation

Candidate Management & Email Automation System in Salesforce

Build a Salesforce-native candidate management system with automated HR notifications and candidate confirmation emails using Flows and Email Alerts.

Hari Vignesh10 min read

Salesforce Developer

Candidate Management & Email Automation System in Salesforce cover infographic

1. Project Objective

This guide covers the end-to-end implementation of a Candidate Management and Email Automation solution on the Salesforce platform. The project eliminates manual recruitment communication by automating key email notifications using custom objects, Record-Triggered Flows, Email Alerts, and branded Lightning Email Templates.

By the end of this guide, your Salesforce org will:

  • Maintain all candidate details in a single custom object (Candidate__c)
  • Automatically notify HR and the CEO when a new candidate record is created
  • Automatically send a branded confirmation email to the candidate when their status changes to Confirmed
  • Have all components packaged and deployable to any other Salesforce org

2. Technologies Used

AreaDetail
PlatformSalesforce (Lightning Experience)
Custom ObjectCandidate__c
AutomationRecord-Triggered Flow (After Save)
EmailLightning Email Templates (HTML) + Email Alerts
BrandingSalesforce Static Resources (company logo)
DeploymentSalesforce Package Manager (Unlocked Package)

3. Custom Object & Fields — Candidate__c

3.1 Create the Custom Object

  1. Go to Setup (gear icon, top right) and click Setup.
  2. In the Quick Find box, type Object Manager and select it.
  3. Click the Create dropdown (top right) and select Custom Object.
  4. Fill in the following:
    • Label: Candidate
    • Plural Label: Candidates
    • Object Name: Candidate__c (auto-filled)
  5. Under Optional Features, check:
    • Allow Reports
    • Allow Activities
    • Track Field History (important for Status changes)
  6. Click Save.

3.2 Create Custom Fields

Navigate to Candidate__c in Object Manager, click Fields & Relationships, then New for each field below.

FieldDefinition
EmailType: Email | Field Name: Email__c | Required: Yes
PhoneType: Phone | Field Name: Phone__c
RoleType: Text | Length: 100 | Field Name: Role__c
Current CompanyType: Text | Length: 255 | Field Name: Current_Company__c
Last CompanyType: Text | Length: 255 | Field Name: Last_Company__c
SkillsType: Long Text Area | Length: 32768 | Field Name: Skills__c
ExperienceType: Number | Decimal Places: 0 | Field Name: Experience__c (years)
StatusType: Picklist | Values: New; Interviewing; Confirmed; Rejected | Field Name: Status__c
Notice PeriodType: Number | Decimal Places: 0 | Field Name: Notice_Period__c (days)
Onboarding DateType: Date | Field Name: Onboarding_Date__c
CommentsType: Long Text Area | Length: 32768 | Field Name: Comments__c

After creating all fields, go to Setup > Profiles > HR Profile and set Field-Level Security to Visible for each field.

4. Step-by-Step: Create Lightning Email Templates

4.1 Upload the Company Logo as a Static Resource

  1. Go to Setup > Static Resources > New.
  2. Name the resource (e.g., CompanyLogo). Click Choose File and upload your logo image (PNG or JPG).
  3. Set Cache Control to Public.
  4. Click Save. Note the resource name — you will use it in the email template HTML.
  5. To get the logo URL for use in HTML: /resource/CompanyLogo (relative) or the full URL from the Static Resource detail page.

4.2 Create Email Template 1: HR Notification

  1. Open App Launcher (9-dot grid), search for Email Templates, and open it.
  2. Click New Email Template.
  3. Fill in:
    • Name: New_Candidate_HR_Alert
    • Related Entity Type: Candidate__c
    • Template Type: Custom (HTML)
  4. In the body, write your HTML. Include these merge fields:
    • {!Candidate__c.Name} — candidate full name
    • {!Candidate__c.Role__c} — applied role
    • {!Candidate__c.Experience__c} — years of experience
    • {!Candidate__c.Email__c} — candidate email
  5. Add the logo using an <img> tag: <img src="/resource/CompanyLogo" style="width:150px;" />
  6. Click Save.

4.3 Create Email Template 2: Candidate Confirmation

  1. Click New Email Template again.
  2. Fill in:
    • Name: Candidate_Confirmation_Email
    • Related Entity Type: Candidate__c
    • Template Type: Custom (HTML)
  3. In the body, include:
    • {!Candidate__c.Name} — personalized greeting
    • {!Candidate__c.Role__c} — position they are confirmed for
    • {!Candidate__c.Onboarding_Date__c} — their joining date
  4. Add the company logo and a congratulations message.
  5. Click Preview to verify merge fields render. Then Save.

5. Step-by-Step: Create Email Alerts

5.1 Create Alert 1 — HR Notification

  1. Go to Setup > Quick Find > Email Alerts > New Email Alert.
  2. Fill in:
    • Description: New_Candidate_HR_Alert
    • Unique Name: New_Candidate_HR_Alert (auto-filled)
    • Object: Candidate
    • Email Template: New_Candidate_HR_Alert (from step 4.2)
  3. Under Recipients, set Type to Role and select HR. Add another recipient for CEO (Role or specific user).
  4. Click Save.

5.2 Create Alert 2 — Candidate Confirmation

  1. Click New Email Alert again.
  2. Fill in:
    • Description: Candidate_Confirmation_Email
    • Object: Candidate
    • Email Template: Candidate_Confirmation_Email (from step 4.3)
  3. Under Recipients, set Type to Email Field and select the Email__c field. This sends to the candidate's own email address.
  4. Click Save.
Important: Do not hardcode email addresses in Email Alerts. Using Role-based recipients and Email Fields ensures the package is portable across orgs.

6. Step-by-Step: Build the Record-Triggered Flow

6.1 Create a New Flow

  1. Go to Setup > Flows > New Flow.
  2. Select Record-Triggered Flow. Click Create.
  3. Set Object to Candidate. Trigger to: A record is created or updated.
  4. Set Optimize the Flow for to Actions and Related Records.
  5. Click Done.

6.2 Add a Decision Element

  1. Click the + icon on the flow canvas and select Decision.
  2. Label the Decision: Check Trigger Condition.
  3. Add Outcome 1 — New Record Created:
    • Label: Is New Record
    • Condition: {!$Record__Prior.Id} IS NULL equals true (or use ISNEW() formula resource)
  4. Add Outcome 2 — Status Confirmed:
    • Label: Status Is Confirmed
    • Condition 1: {!$Record.Status__c} Equals Confirmed
    • Condition 2: {!$Record__Prior.Status__c} Does Not Equal Confirmed (ISCHANGED check)
  5. Set Default Outcome to: Neither Condition Met (connects to End).

6.3 Add Email Alert Action for Path A — HR Notification

  1. From the Is New Record outcome path, click + and select Action.
  2. Search for and select Email Alert.
  3. In the Email Alert field, search for and select New_Candidate_HR_Alert.
  4. Set the Record ID field to {!$Record.Id}.
  5. Click Done. Connect this element to the End element.

6.4 Add Email Alert Action for Path B — Candidate Confirmation

  1. From the Status Is Confirmed outcome path, click + and select Action.
  2. Select Email Alert.
  3. In the Email Alert field, search for and select Candidate_Confirmation_Email.
  4. Set Record ID to {!$Record.Id}.
  5. Click Done. Connect to the End element.

6.5 Save and Activate the Flow

  1. Click Save. Enter:
    • Flow Label: Candidate Management Email Automation
    • API Name: Candidate_Management_Email_Automation
  2. Click Save.
  3. Click Activate. Confirm activation.

7. Testing

7.1 Test HR Notification (New Record)

  1. Navigate to the Candidate tab (or App Launcher > Candidates).
  2. Click New. Enter a test candidate name, email, role, and status = New.
  3. Click Save.
  4. Check the HR email inbox and CEO email inbox — both should receive the HR notification email within a few seconds.

7.2 Test Candidate Confirmation (Status Change)

  1. Open the test candidate record you just created.
  2. Click Edit. Change Status from New to Confirmed.
  3. Click Save.
  4. Check the candidate's email inbox — they should receive the confirmation email with their name, role, and onboarding date.

7.3 Verify Flow Execution Logs

  1. Go to Setup > Flows > Find your flow > Pause and Resume (or use Flow Error Emails if the flow fails).
  2. To view recent runs: Setup > Flow Error Email or use Debug in Flow Builder.
  3. Confirm both paths executed without errors.

8. Packaging & Deployment

8.1 Create an Unlocked Package

  1. Go to Setup > Package Manager > New.
  2. Enter Package Name: CandidateManagement. Click Save.
  3. Click Add Components. Add all of the following:
    • Candidate__c — custom object and all its fields
    • Candidate Management Email Automation — the Record Triggered Flow
    • New_Candidate_HR_Alert — Email Template 1
    • Candidate_Confirmation_Email — Email Template 2
    • New_Candidate_HR_Alert — Email Alert 1
    • Candidate_Confirmation_Email — Email Alert 2
    • CompanyLogo — Static Resource
  4. Click Add to Package for each component.

8.2 Validate and Upload

  1. Click Upload. Enter Version Name and Version Number. Click Upload.
  2. Wait for the upload to complete. Salesforce validates all dependencies during upload.
  3. If validation fails, check: (a) Email Alerts reference templates by name, not ID; (b) No hardcoded Salesforce record IDs exist in templates.
  4. Once successful, copy the Installation URL from the package detail page.

8.3 Install in Target Org

  1. Log in to the target Salesforce org.
  2. Paste the installation URL into the browser address bar and press Enter.
  3. Select Install for All Users (recommended). Click Install.
  4. After installation completes, go to Object Manager and verify Candidate__c is present with all fields.
  5. Go to Setup > Flows and verify the flow is installed (activate it if inactive).
  6. Run the same tests from Section 7 to confirm the automation works in the new org.

9. Future Enhancements

  • Resume Upload: Allow recruiters to attach candidate CVs as Salesforce Files (ContentDocument) linked to the Candidate__c record. Add a File upload component on the candidate Lightning page.
  • Auto-Create Contact: Trigger a second flow path that creates a Contact record linked to a recruitment Account when Status changes to Confirmed, enabling full CRM tracking post-hire.
  • Dashboard & Reporting: Build Salesforce reports and dashboards for: pipeline by status, time-to-hire metrics, source channel analysis, and recruiter performance.
  • External Integration: Use Salesforce APIs or MuleSoft to sync candidates from external job portals (LinkedIn, Naukri, Indeed) directly into Candidate__c.
  • Approval Process: Add a Salesforce Approval Process before Status can be changed to Confirmed, requiring manager sign-off via email.

10. Conclusion

The Candidate Management & Email Automation system built on Salesforce delivers a fully automated, end-to-end recruitment communication workflow. By following the steps in this guide, organizations can deploy a professional-grade solution with zero manual email effort, consistent branding, and full package-portability across Salesforce orgs.

This solution is a strong foundation for further expansion into a complete Salesforce-native applicant tracking system (ATS).

Topics:Salesforce FlowEmail AutomationRecruitment

Ready to accelerate your digital transformation?

Partner with Subsel to build modern CRM, AI-enabled automation, and enterprise systems that scale.