add attachment in exchange smartobject

  • 7 February 2020
  • 3 replies
  • 4 views

Hi All,

 

I am using the Exchange Online Service SmartObject to create and email and then send it on behalf of someone. I need to add attachments to the email from a SharePoint list. I've added the Attachment SmartObject in the workflow and it is asking for the ID and Attachment File. I added the EmailID to the ID field and then loaded the file information from reference I made from a list lookup with the files. I continually get the error Object of type 'System.Object[]' cannot be converted to type 'System.String'. Anyone have any thoughts or workarounds on this?

 

Thanks,

Ben


3 replies

Userlevel 6
Badge +16

Hi bhickok2,


 


Perhaps, another approach is to include the attachment link in the email when using the Email SmartObject to send out the email.


Hi  @bhickok2 


 


I came across this article that address's your situation


https://help.k2.com/support-services/kbt131764


 


According to the article this issue is logged as a bug within K2 and the workround is to Supply the data field with an email that is grabbed using the Inline function under Sharepoint known as "GetK2EmailsForSharePointUsers()". Supply the site URL, Modified By (not name, value, or email), and K2 for our label parameter for this method.


You can view the article above for indepth explanation.


 


Hope it helps.


 


Regards


HulisaniN

Thanks  @khanh  and  @HulisaniN  for the help. I was actually sending the email in the workflow before the attachment without realizing it. I ended up creating a email draft in the mailbox, attaching the attachment, then sending it. It ended up being pretty simple but I just didn't catch when the email was being sent.

Reply