function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Automate Upload to "Documents" Object (Daily)

Hi All,


I have searched for this, but without any luck, so apologies if this question has already been asked elsewhere.


I have been tasked with making our company's Daily Sales data available on Salesforce, for each Sales Person via Dashboard (to be updated on a daily basis).


All our Sales data is not (nor will it be) available within Salesforce; as such I am proposing to get around the problem using the following method:


- Generate a Daily pdf Report for each Sales Person (SP)

- Name each pdf with the Salesforce (SFDC) User.ID of each SP

- Upload each pdf to the "Documents" object within SFDC on a daily basis

- Create an APEX page which references the uploaded sales reports; incorporating the SFDC User.ID of each SP - thus creating a Dynamic sales report page

- Use the APEX page to create a Dashboard item


I have successfully managed to create a Dashboard item using an APEX page which references a pdf within a local drive, using the same principal as above, however, users off-site users (including all the SPs) cannot access any Network drives off-site; as such it was suggested to try uploading the pdfs to the "Documents" object, and referencing the APEX page from that instead.


So what I need to know is whether or not is it possible to automate the upload of multiple files to the "Documents" object on SFDC on a daily basis and if so - how?


Please let me know if you need any additional information from me, or clarification on anything.


Any help would be much appreciated.


Many thanks,




Yes, you can use the soap or rest APIs to create or update documents programmatically, see the documentation under the integration section of the technical library.