Apex
CloudFiles Client
Create File Connect Files
the create files connect files apex action enables programmatic creation of a salesforce files connect object for files stored in external cloud storage platforms this allows you to link externally hosted files—such as those uploaded or copied via cloudfiles to sharepoint, google drive, box, and others—directly to salesforce records without consuming salesforce file storage before proceeding, we assume you have reviewed the create file connect files docid\ pusu8 2agvntrqjeqcgdy flow action global static list\<contentdocumentlink> execute(list\<flowinput> inputs) parameters global class flowinput { @invocablevariable(label='external data source name') global string externaldatasourcename; @invocablevariable(label='name') global string name; @invocablevariable(label='salesforce object id') global string salesforceobjectid; @invocablevariable(label='file connect resource id') global string fileconnectresourceid; } return type list of contentdocumentlink object for the files connect file example cldfs createcontentdocumentlink flowinput input = new cldfs createcontentdocumentlink flowinput(); input externaldatasourcename = 'xyz12345'; input name = 'x1234x'; input salesforceobjectid = '0016hxxxxxxxxxx'; input fileconnectresourceid = '01kehakuvatuh5r5qrkjblr3itm3e6vcxn'; list\<contentdocumentlink> links = cldfs createcontentdocumentlink execute(new list\<cldfs createcontentdocumentlink flowinput>{input});