Salesforce Send Email with Attachment and Custom Subject

Sends an email on a Salesforce case with a file attachment and a custom subject, and adds the file to the case's chatter feed. Use it when a case reply needs both a document and a specific subject line.

What it does

  • Uploads the attachment to Salesforce and sends an email on the case with your subject and HTML body.
  • Adds the attachment to the case's chatter feed with a comment.
  • Returns whether the whole operation succeeded.

Inputs

NameTypeDescription
File ContentsStringbase64 encoded file contents
Chatter CommentStringsalesforce chatter comment for the agents
File NameStringname of the file for attachment
Email HTML BodyStringEmail HTML Body
Subject LineStringemail subject
Salesforce Instance URLCredentialssalesforce instance url generated during the auth
Salesforce Access TokenCredentialssalesforce access token, generated during the auth
Salesforce Case IDStringsalesforce case ID, to send email to Possible values: e, x, e, c, u, t, i, o, n, , e, x, t, e, r, n, a, l, , i, d.

Outputs

NameTypeDescription
SuccessBooleanSuccessfully run, true/false

Notes

  • Requires a Salesforce access token and instance URL from the Salesforce Login action.
  • The attachment is provided as base64 content together with a filename.

API reference