Apex
CloudFiles Client
Create Attachments
this method can be used to create attachments using apex global static list\<attachment> createattachments( list\<types createattachmentinput> attachmentinputs, string library, string runas ) parameters attachmentinputs list of types createattachmentinput docid 18imxnekouenqgggsb92h library type of library example sharepoint you can get this value from content library docid\ wtj62wux2a6hgfwvpm4ij runas email id of the user on whom behalf the function should run if you want to run the action as automation user, supply integrationuser return type list of attachment docid 7vdkfats tonll2jilgsg objects example to link a folder in sharepoint to a salesforce record list\<cldfs types createattachmentinput> inputs = new list\<cldfs types createattachmentinput>{ new cldfs types createattachmentinput(\<folder id>, 'folder', \<salesforce record id>, 'b!zfa15hrs1uy9ph3vw5tfjahfp1lrylzavdwlnhyyq8sa l6ejxb tjbmyuxi1qfl') }; list\<cldfs attachment> attachments = cldfs client createattachments( inputs, 'sharepoint', 'integrationuser' );