Send Email with attachments in Salesforce Chatter

Expectation here is to send email with attachments in Salesforce Chatter.

Bot is able to send email without attachments using “Add Email” activity. I am not able to find extra parameters to pass document path or attach files.

How do i achieve this. Do i have to use any activity before “Add Email” Activity.

@Cristian_Negulescu : Pls share your thoughts on this as well.

Hello Sonal,
Multiple clients ask these questions about emails but the information on salesforce documentation is limited or ambiguous.
I will provide here an idea base on what I read but I was not able to test this so I’m not able to guarantee this.
Please check this movie where I explain step by step via REST API how to upload and assign a file to Salesforce.

In this movie, at time 8:19 I show very well the Commands via REST API on the last command with ASSIGN FILE to CASE you need to provide on parameters LinkedEntityID you will provide Your EmailMessages ID instead of CASE ID.

That’s the only Idea that I have based on what I read on the internet. Please tell us what you configure in SalesForce for AddEmail Activity to work. (To be more direct a lot of people say that this activity just add Email on the database of Salesforce and on the webpage but don’t see the actual email and I don’t know what special setting you need to do in salesforce for this)
Thanks,
Cristian Negulescu

@Cristian_Negulescu : I’ve provided all details in this activity to send email. Parent Id = Case Id (for e.g. 3433D000021txfQIS) → Salesforce team has provided Bot access to this object.

image

I’ve referred your shared video. Thanks for sharing this. I am currently using activities under Salesforce Application Scope- Add New File, Get File List and Assign File but getting below error using Add New File Activity.

Hello Sonalk,
In Add new File you don’t need Version data the component is doing this internally

Thanks,
Cristian Negulescu

@Cristian_Negulescu : There is one attach file activity under Chatter. What to pass in below parameters not sure whether we can pass any file as path in this activity.

image

Thanks for sharing above video. I’ve tried to use “Add New File” activity but not getting ContentVersionId (NULL) after passing that activity.

@Cristian_Negulescu : I am now able to attach file in case using “Upload File” & Assign File Activity.

Is it possible to send email with that uploaded attachment? - can we use Output Id (received while uploading file) in Add Email Activity activity parameters.
image