Apex
CloudFiles Client
Create Salesforce File
this method action lets you copy a file from external storage into salesforce as a native salesforce file it uses file metadata to fetch the file and makes it easily accessible and manageable within salesforce before we dive in, we assume you have reviewed the create salesforce file docid\ fnqyk7y504tsivsv5c533 flow action global static void createcontentversion( list\<types createcontentversionpayload> files, string runas ) parameters inputs list of types createcontentversionpayload docid 3zjtow2x2fg6e 8jy9xf 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 this functions doesn't return anything example list\<cldfs types createcontentversionpayload> files = new list\<cldfs types createcontentversionpayload>{ new cldfs types createcontentversionpayload( '01kehakuusu3e5ouxbbjglytd3izu4bcrv', //fileid 'b!njbtpq z5uejtfrj f24xeqqlpud8vtfsg7gbcrxjepiun9bkb 7qbdptqhvd cp', //driveid 'sharepoint', //library '{"recordid" "00qdl000009q8txuaa"}' //recordid json ) }; cldfs client createcontentversion(files, 'integrationuser');