---
schema_version: "1"
id: 63d84aeeef84008317d9b4b6e37930dd9ce71250e59a0d286bf1fd36aac999e7
title: Send a Custom Notification with a Flow
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/automate_flow_build_example_send_custom_notification.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.automate_flow_build_example_send_custom_notification.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 7345b5ada711f0c08b5cbf24decaa46d136365f607893e5f9e663c298077700e
description: Create a flow that sends a custom notification to users when a specific event occurs. Custom notifications appear in the notification bell and can be delivered to the Salesforce desktop or mobile app.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Send a Custom Notification with a Flow

Create a flow that sends a custom notification to users when a specific event occurs. Custom notifications appear in the notification bell and can be delivered to the Salesforce desktop or mobile app.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:left;vertical-align:top;" id="d350490e59">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d350490e59 ">To view notification types:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d350490e59 ">View Setup and Configuration</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d350490e59 ">To create and edit notification types:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d350490e59 ">Customize Application</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d350490e59 ">To send custom notifications:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d350490e59 ">Send Custom Notifications</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d350490e59 ">To open, edit, create, activate or
              deactivate a flow using all flow types, elements, and features available in Flow
              Builder, including Einstein and Agentforce for Flow:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d350490e59 ">Manage Flow</td>

          </tr>
        </tbody>
      </table>

![Navigation bell showing a notification](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/customnotification.png)

## Create a Custom Notification Type

Create a custom notification type that defines the channels for your notification.

1. From Setup, in the Quick Find box, enter Notification Builder, and then select **Custom Notifications**.
2. Click **New**.
3. Add your custom notification name. For example, Notify Owner New Contact.
4. The API name auto-fills. For example, Notify\_Owner\_New\_Opportunity.
5. For Supported Channels, select **Desktop**, **Mobile**, or **Desktop** and **Mobile**.
    
    - Desktop sends a notification to the desktop notification tray.
    - Mobile sends an in-app and push notification to enabled supported apps.
6. Save your notification type.
7. If you selected Mobile, enable the supported apps for your notification type.

![New custom notification type window](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/custom_notification_type_modal.png)

To learn more about custom notifications, see [Manage Your Notifications with Notification Builder](https://help.salesforce.com/s/articleView?id=platform.notif_builder.htm&type=5&language=en_US).

## Create the Flow

Create a flow that sends a custom notification.

1. Open the Flows list view.
    
    - From the Automation app, select the **Flows** tab.
    - From the **Flows** tab in any Lightning app, click the actions menu and select **Open Flow**.
    - From Setup, in the Quick Find box, enter Flows, and then select **Flows**.
    
    Note that the Automation app and Flows tab options don't require Setup access.
2. Create a flow. For example, create a record-triggered flow.
    
    - From the Automation app, click **New** | **Triggered Automations** | **Record-Triggered Flow**.
    - From Setup, click **New Flow** | **Triggered Automations** | **Record-Triggered Flow**.
    
    The flow opens in Flow Builder. If your flow has a Start element panel, the Configure Start panel opens.
3. If your flow has a Start element panel, configure the Start element. For example, configure the Start of a record-triggered flow that triggers when a contact record is created
    1. For Object, select the object that triggers the flow. For example, select **Contact**.
    2. For Trigger the Flow When, select when the flow runs. For example, **A record is created**.
    3. Configure any entry conditions or other settings as needed.

## Define Your Recipients

Create a text collection variable to store recipient IDs, then use an assignment element to add IDs to the collection.

1. Create a collection variable to store the recipient IDs.
    1. To open the Toolbox, click ![Toolbox icon.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/automate_flow_build_example_use_online_form_create_record/automate_flow_build_example_use_online_form_create_record_toolbox.png).
    2. Click **New Resource**, and then select **Variable**.
    3. For API Name, enter RecipientIds.
    4. For Description, enter Stores the IDs of users who receive the custom notification.
    5. For Data Type, select **Text**.
    6. Select the **Allow multiple values (collection)** checkbox.
    7. Click **Done**.
2. Add an assignment element to add recipient IDs to the collection.
    1. Click ![Add element plus icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/flow_builder_add_element_plus.png), and select **Assignment**.
        
        The assignment element panel opens.
    2. For Label, enter a descriptive name. For example, Add Recipient IDs.
        
        The API name auto-fills.
    3. For Description, enter a description of what this element does. For example, Adds recipient IDs to the recipientIds collection variable.
    4. For Variable, select **RecipientIds**.
    5. For Operator, select **Add**.
    6. For Value, select the resource that contains the recipient user ID. For example, to send the notification to the triggering contact's owner, click **Triggering Contact** and then search for and select **Owner ID**.
        
        You can add multiple assignment rows to add multiple recipient IDs to the collection.

![Assignment element panel showing the addition of IDs](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/add_recipient_ids_assignment.png)

## Get the Custom Notification Type ID

Use a Get Records element to get the ID of the custom notification type you created.

Add a Get Records element.

1. Click ![Add element plus icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/flow_builder_add_element_plus.png), and select **Get Records**.
    
    The Get Records panel opens.
2. For Label, enter a descriptive name. For example, Get Custom Notification Type.
    
    The API name auto-fills.
3. For Description, enter a description of what this element does. For example, Gets the ID of the custom notification type to use to send the notification.
4. For Object, select **Custom Notification Type**.
5. For Condition Requirements, select **All Conditions Are Met (AND)**.
6. Add a condition to filter by the notification type you created.
    
    - For Field, select **Name** . There are two Name fields. Use the one with the DeveloperName API name. To see the API name of the Name field, hover on the Name field and then hover on the information icon for that field.
    - For Operator, select **Equals**.
    - For Value, enter the name of the custom notification type you created. For example, Notify\_Owner\_New\_Opportunity.
7. Use default values for the remaining fields.

![Get Records element getting the custom notification type ID](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/get_custom_notification_type.png)

## Configure the Send Custom Notification Action

Create a text template for the notification body. Then configure the Send Custom Notification action with recipients, content, and a target to navigate the user to when they click the notification.

1. Create a text template to store the notification body.
    1. To open the Toolbox, click ![Toolbox icon.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/automate_flow_build_example_use_online_form_create_record/automate_flow_build_example_use_online_form_create_record_toolbox.png).
    2. Click **New Resource**, and then select **Text Template**.
    3. For API Name, enter a descriptive name. For example, NotificationBodyTextTemplate.
    4. For Description, enter a description of what this text template is used for. For example, Content to use for the notification body.
    5. For Body, enter the notification body text.
        
        To add merge fields to the text template, click **Insert a resource**, and then select the relevant resource.
        
        For example, Click to view {!$Record.FirstName} {!$Record.LastName}.
    6. Click the View as Rich Text dropdown and select **View as Plain Text**.
    7. Remove any extra characters in your body text.
    8. Click **Done**.
2. Add an action element to your flow.
    1. Click ![Add element plus icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/flow_builder_add_element_plus.png), and select **Action**.
        
        A list of available actions opens.
    2. In the search bar, enter Notifications, and then select **Send Custom Notification**.
        
        The Send Custom Notification action configuration panel opens.
3. For Label, enter a descriptive name for the action. For example, Send Owner a Notification.
    
    The API name auto-fills.
4. For Description, enter a description that explains what notification this action sends. For example, Sends a notification to the new contact's owner.
5. For Custom Notification Type ID, select the record ID of the record you got in the Get Records element. For example, click **Custom Notification Type from Get Custom Notification Type** and then click **Custom Notification Type ID**.
6. For Notification Body, enter the body text or select a resource that contains the body. For example, select the **NotificationBodyTextTemplate** resource.
7. For Notification Title, enter the title text or select a resource that contains the title. For example, enter New Contact!.
8. For Recipient IDs, select the collection variable where the recipient IDs are stored. For example, **RecipientIds**.
9. For Target ID, select the record ID that users go to when they click the notification. For example, to navigate them to the triggering contact record page, select **Triggering Contact** and then search for and select **Contact ID**.

![Send Custom Notification action element configured](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/send_notification_to_owner.png)

To learn more about the Send Custom Notification action element, see [Send Custom Notification Action](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_actions_sendcustomnotification.htm&release=264.0.0&type=5 "Send a custom notification to users when a specific event occurs. Custom notifications appear in the notification bell and can be delivered to the Salesforce desktop or mobile app.").

## Save, Test, and Activate the Flow

Save the flow and then test it in a sandbox to make sure that it works as expected. Then, activate it to start sending custom notifications.

1. Save the flow.
    1. Click **Save**.
    2. For Flow Label, enter a descriptive name for the flow. For example, Send New Contact Owner a Notification
        
        The Flow API name auto-fills.
    3. For Description, enter a description that explains what the flow does. For example, Sends a custom notification to the contact owner when a new contact is created.
    4. Click **Save**.
2. Test the flow to verify that the notification is sent correctly.
    1. Create a test contact in a sandbox using non-real data and make yourself the owner of the new contact.
    2. Click **Debug** to test the flow in the flow debugger.
    3. If your flow is a record-triggered flow that's triggered when a record is created, select **Skip start condition requirements**.
        
        This setting let's you test the record-triggered flow with an existing record even though the flow is configured to run with a new record.
    4. Click **Run**.
    5. Review the debug log, opening each section to see the details.
    6. Fix any errors that show in the log.
3. Activate the flow.
    
    1. Click **Activate**.
    
    The flow is now active and sends custom notifications when triggered.

Monitor the notifications to ensure they're being delivered as expected. Remember that your org can run up to 10,000 notification actions per hour, and each notification can have up to 10,000 users as recipients.