--- title: "Supplemental - SendWelcomeEmails" slug: "supplemental-sendwelcomeemails" updated: 2025-11-19T19:36:42Z published: 2025-11-19T19:36:42Z canonical: "help.rapididentity.com/supplemental-sendwelcomeemails" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.rapididentity.com/llms.txt > Use this file to discover all available pages before exploring further. # Supplemental - SendWelcomeEmails ## πŸ“˜ Overview The `SendWelcomeEmails` Action Set automates the process of **sending claim or welcome emails** to new or existing users within RapidIdentity. It can be used as either a **scheduled job** or a **function** called from another Action Set, ensuring a consistent and reliable onboarding experience for end users. This job supports configurable email templates, attribute-based control flags, and flexible targeting options through RIC attributes or LDAP filters. --- ## 🎯 Purpose - Send claim or welcome emails to users automatically upon account creation or update. - Log email generation and delivery for auditing and reporting. - Support both direct invocation (via function call) and scheduled execution. - Prevent duplicate emails using a configurable β€œwelcome email sent” (e.g., idautoPersonExtBool1) flag. Optionally, add this attribute to a delegation so that welcome emails are re-delivered as needed. --- ## βš™οΈ Parameters | **Parameter** | **Required** | **Description** | | --- | --- | --- | | **logOnly** | Optional | Displays the email message to the screen and builds the RapidIdentity cookie without sending emails. Set to `false` once tested. | | **keyField** | Optional | RapidIdentity attribute used to locate the user(s) (e.g., `employeeType`, `idautoPersonHRID`, `idautoPersonUsernameMV`). | | **keyValue** | Optional | The corresponding value for the `keyField`. | | **searchParameter** | Optional | LDAP filter for advanced user lookups. Takes precedence over `keyField` and `keyValue` if supplied. | | **record** | Optional | Existing record object (if calling from another Action Set). | | **sessionRI** | Optional | Existing RapidIdentity session object (if calling from another Action Set). | --- ## 🧠 How to Use ### 1️⃣ Import the Action Set 1. In **RapidIdentity Connect**, click **β€œAdd Action Set.”** 2. Choose **Import** and select `SendWelcomeEmails` from the **Community β†’ Supplemental** category. 3. Save the Action Set into your Connect project. --- ### 2️⃣ Configure and Test Before enabling email delivery, run the Action Set in **test mode**: `logOnly=true` This mode: - Builds the RapidIdentity session cookie. - Outputs the generated email message to the screen. - Ensures that no real emails are sent. Once validated, set `logOnly=false` to enable production delivery. --- ### 3️⃣ Setup the Email Template Ensure that the following global variable and file exist in your Connect project: | Global Variable | Example Value | Purpose | | --- | --- | --- | | `Global.emailTemplatesPath` | `/emailTemplates/` | Defines the path to all stored email templates in Connect | | `Global.welcomeEmailTemplate` | `welcomeTemplate.html` | Defines the HTML template for the welcome email. | πŸ“ **Template Location:** `/emailTemplates/` 🧩 The HTML file should include placeholders for user attributes (e.g., `%displayName%`, `%Username%`, `%ClaimCode%`). --- ### 4️⃣ Configure the Welcome Email Flag By default, the Action Set uses `idautoPersonExtBool1` to track whether a welcome email has been sent. When a user receives the email, this attribute is set to **TRUE**, preventing duplicate messages. If you wish to use a different attribute, modify the following variable: `welcomeEmailFlagAttribute = "idautoPersonExtBool1"` > πŸ” **Re-sending emails:** If the attribute is unchecked (set to FALSE) via delegation, the job will resend a welcome email the next time it runs. --- ### 5️⃣ Schedule the Job For continuous delivery of new welcome emails: - Schedule the Action Set to run **every minute**. - This ensures that new users or toggled records are processed promptly. --- ### 6️⃣ Email Delivery Logic πŸ“€ **Primary Recipient Logic:** 1. If `idautoPersonHomeEmail` exists β†’ send to personal email. 2. Otherwise β†’ send to `mail` (work email). 3. If logOnly = true, it will send the Welcome Email to the Global.notifyEmail email address(es). All sent emails are logged in RapidIdentity under the **Reports Module** tab for traceability. --- ## πŸ“Š Reporting and Verification You can verify which users have received welcome emails using the **Reports** module: - Go to **Reports β†’ My Reports β†’ Add Report**. - Filter by `action.displayName = "Sent Welcome Email"`. - Optionally export results for tracking and compliance reporting. --- ## 🚫 Important Notes - Always test with `logOnly=true` before scheduling in production. - Avoid modifying or deleting the welcome email flag attribute while jobs are running. - Verify that all Global variables are correctly configured before scheduling the job. - Ensure that your RapidIdentity SMTP configuration is functional and verified. --- ## 🧩 Example Invocation (Function Mode) If called from another Action Set: `SendWelcomeEmails( record: userRecord, sessionRI: sessionRI, logOnly: false )` This enables inline execution as part of a larger provisioning or update workflow. --- ## βœ… Summary | **Feature** | **Description** | | --- | --- | | **Category** | Supplemental | | **Job Type** | Scheduled / Callable Function | | **Primary Action** | Send claim/welcome emails | | **Safety Flag** | `idautoPersonExtBool1` (default) | | **Template Path** | `/emailTemplates/` | | **Recommended Schedule** | Every 1 minute | | **Best Practice** | Run with `logOnly=true` before production use |