Limitations
- This action only logs an email as an EmailMessage record and it does not actually send the email. To send, you have to use Salesforce Send email and optionally pair it with Log email activity in the same agent.
- As with other Salesforce actions, the exact parameter set and behavior can change over time. Confirm how this action behaves in your own environment before you depend on it for large-scale or fully automated contact creation.
Prerequisites
- Your Salesforce org must be connected as a data source in Glean, and an admin must enable the Salesforce action pack and complete Salesforce Actions Setup including OAuth configuration.
- Users must authenticate for Salesforce actions on first use and have permission to create EmailMessage records and write to fields such as IsExternallyVisible.
Supported parameters
| Parameter | Type | Description |
|---|---|---|
| From address | String | Email address that should be recorded as the sender of the logged email. |
| Related to ID | Integer | ID of the record to associate this email with. |
| Subject | String | Subject line of the email. |
| To address | String | Email addresses of the recipients (comma-separated if multiple). |
| Bcc address | String | BCC email addresses (comma-separated if multiple). |
| Cc address | String | One or more CC recipient addresses to store with the logged email. |
| Html body | String | HTML body of the email to record as the EmailMessage content. |
| Is client managed | String | Whether the email is client-managed (not sent through Salesforce). |
| Is externally visible | String | Whether this is an incoming email (true) or outgoing email (false). |
| Is incoming | Boolean | Whether this is an incoming email (true) or outgoing email (false). |
| Message date | Date/time | Date/time the email was sent in ISO format. Defaults to current time if not provided. |
| Parent ID | Integer | ID of the parent record, typically a Case for case-related emails. |
| Status | String | Status of the email. 0=New, 1=Read, 2=Replied, 3=Sent, 4=Forwarded, 5=Draft Examples: “0” “3” “5” |
| Text body | String | Plain text body of the email. |
Usage example
You need to log a follow-up email that was sent to a customer about an open support case, recording the email content in Salesforce so your support team has a complete activity history. Instruction to an agent: “Log the follow-up email I sent to [email protected] about Case 00001234 with subject Re: Technical Issue Resolution, including the email body and mark it as sent.” Resulting behavior:- Calls a Salesforce search action to find the Case matching “00001234”.
- Retrieves the Case ID (for example, “500xx000001234567”) and related Contact ID.
-
Calls Log email activity with:
-
From addressset to your email address (for example, “[email protected]”). -
To addressset to “[email protected]”. -
Subjectset to “Re: Technical Issue Resolution”. -
Html bodyset to the email content with formatting. -
Text bodyset to plain text version of the email. -
Message dateset to the current date and time when the email was sent. -
Parent IDset to “500xx000001234567” (the Case ID). -
Related to IDset to the Contact ID for John Doe. -
Statusset to “3” (Sent). -
Is incomingset to false (outgoing email). -
Is externally visibleset to true to make it visible on the customer portal.
-
- Creates a new EmailMessage record in Salesforce.
- The logged email appears in the Case activity timeline.
- Support team members viewing the Case can see the complete email history.
Troubleshooting
Action fails with INVALID_FIELD_FOR_INSERT_UPDATE mentioning IsExternallyVisible
Action fails with INVALID_FIELD_FOR_INSERT_UPDATE mentioning IsExternallyVisible
- Possible cause: The Salesforce profile or permission set for the connected user cannot write to the IsExternallyVisible field.
- Fix: In Salesforce Setup, update field-level security or permission sets so that the profile of the user has write access to IsExternallyVisible or remove this field from the action configuration, if appropriate, then retry the action.
Action fails with an authorization or OAuth error
Action fails with an authorization or OAuth error
FAQs
Does this action send an email, or only log it?
Does this action send an email, or only log it?
This action only logs an email interaction as an EmailMessage record in Salesforce. To actually send an email, use the Salesforce Send email action and, if needed, combine it with Salesforce Log email activity in the same agent.
When should I use Salesforce Log email activity instead of the log_email option on Salesforce Send email?
When should I use Salesforce Log email activity instead of the log_email option on Salesforce Send email?
Use Salesforce Log email activity when you need an explicit, standalone step to record an email interaction, for example, when the email was generated or sent outside Salesforce Send email, or when you want separate control over how and when the activity is logged. Use the log_email flag on Salesforce Send email when you want sending and logging to happen together in one action.