---
schema_version: "1"
id: b62240291fd79acc6e4b30afd8af0cb0e250a8fc6851a4294982a291e5b89898
title: Get Users from Email Addresses Action
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_ref_elements_actions_activities_match_users.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_actions_activities_match_users.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b1aa219092dd079d3d3052122f7db824e4a31116994248219e1d42e5e1d9b58c
description: "This action gets user records with email addresses that match those addresses in the To, From, or CC address field of a sent email captured by Einstein Activity Capture. To be used in the Activities: Match Email to Records flow. Requires that Sync Email as Salesforce Activity is enabled in Einstein Activity Capture."
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Get Users from Email Addresses Action

This action gets user records with email addresses that match those addresses in the To, From, or CC address field of a sent email captured by Einstein Activity Capture. To be used in the Activities: Match Email to Records flow. Requires that Sync Email as Salesforce Activity is enabled in Einstein Activity Capture.

### 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;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available with Einstein Activity Capture Standard in Sales in <strong>Starter</strong>, <strong>Professional</strong>, and <strong>Enterprise</strong> Editions</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available with <strong>Unlimited</strong> Edition and <strong>Einstein 1 Sales</strong> Edition</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available with Einstein for Sales, which is included in <strong>Einstein 1 Sales</strong> Edition, and available for an extra cost in <strong>Enterprise</strong> and <strong>Unlimited</strong> Editions.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available with Sales Engagement in Sales, which is included in <strong>Performance</strong> and <strong>Unlimited</strong> Editions, and available for an extra cost in <strong>Professional</strong> and <strong>Enterprise</strong> Editions.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available with Revenue Intelligence, which is available for an extra cost in <strong>Enterprise</strong> and <strong>Unlimited</strong> Editions.</td></tr></tbody></table>

In Flow Builder, add an Action element to your flow. In the New Action window, search for Activities Match, and then select **Get Users from Email Addresses**.

## Set Input Values

Use values from earlier in the flow to set the inputs for the action.

 
| Field | Description |
| --- | --- |
| CC Address List | Optional. The comma-delimited list of email addresses of recipients who were sent a carbon copy of the email message. |
| From Address | Required. The email address that the email message was sent from. |
| To Address List | Required. The comma-delimited list of email addresses of recipients who were sent the email message. |

## Store Output Values

 
| Field | Description |
| --- | --- |
| Matched Users | The collection of active user records that have an email address in the From, To, or CC address list. |
| Unmatched Email Addresses | The collection of email addresses that don’t have a matching active user record. |

## Error Conditions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d266779e247">Error Condition</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d266779e250">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Error Condition" class="slds-cell-wrap" style="vertical-align:top;" headers="d266779e247 ">A To, From, or CC email address is invalid</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d266779e250 ">
              <p>The value isn’t a valid email. Check the email address format and try
                again.</p>
              <p style="margin-bottom:0;">Error Code: INVALID_EMAIL_ADDRESS</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Error Condition" class="slds-cell-wrap" style="vertical-align:top;" headers="d266779e247 ">The number of To or CC email addresses exceeds the limit</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d266779e250 ">
              <p>Specify a comma-delimited list that contains no more than 250 email
                addresses.</p>
              <p style="margin-bottom:0;">Error Code: LIMIT_EXCEEDED</p>
            </td>

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

## Usage

To use this action, enable Sync Email as Salesforce Activity. The action is designed mainly to be used within the Activities: Match Email to Records flow.

## How It Works

This action uses as input a list of email addresses from a sent email captured automatically by Einstein Activity Capture or Inbox. The action queries the **Email** field in User records that have these criteria.

- Active user
- Not an API-only user
- Standard user type
- User logged in within the last 365 days

If an email address doesn’t have a corresponding user record and has an internal domain, then the action ignores the email address and doesn’t include it in output. Internal domains are configured in Einstein Activity Capture settings.

You can choose to use the addresses in **Unmatched Email Addresses** in other actions for further processing, such as matching them to contacts or leads.

## Tiebreakers

If an email address matched more than one user record, then all matching user records are stored in **Matched Users** in output. To add tiebreaker logic, consider using custom Apex code.

## Limitations

This action is limited to usage within a flow. It can't be invoked through other methods such as Apex, REST API, Copilot, Prompt Studio, or Einstein Bots. While actions can typically be invoked through various frameworks like InvocableActionService, this specific action is restricted solely to Flow.

If the activityId field is empty when debugging this action, use the Developer Console to query StagedEmail for a value.

#### See Also

- [Test or Troubleshoot Flows with the Flow Builder Debugger](https://help.salesforce.com/s/articleView?id=platform.flow_test_debug.htm&release=264.0.0&type=5 "For flows that don't use Test Mode, use the Debug option to test or troubleshoot the flow. Review step-by-step details of how the flow runs and the path it takes.")
- [Flow Builder Debugger Considerations](https://help.salesforce.com/s/articleView?id=platform.flow_considerations_troubleshooting.htm&release=264.0.0&type=5 "Use these considerations when you debug a flow in Flow Builder.")
- [Knowledge Article: Error when debugging Activity-Object Matching Flow; this.stagedEmailId is null](https://help.salesforce.com/s/articleView?id=005226512&type=1&language=en_US)