Test Drive
Document Generation Test Drive
Automated Document Generation
introduction in the earlier manual document generation docid\ pkeia45u44areccwi7g2z test drive, we saw how users can generate documents directly from templates using the cloudfiles doc gen component on record pages this test drive demonstrates the next level — how you can automate document generation using salesforce flows and doc generation flow actions docid\ nv27oftdk5ukedfzqpbpq instructions follow the same process as described in the manual document generation docid\ pkeia45u44areccwi7g2z test drive 1 go to 'contracts' tab and create a new contract 2 fill in all the required fields in the 'new contract' form 'account name' choose an existing account or create a new one 'price book' select "cloudfiles price book" from the options 'contract image url' provide a public url for an image 'contract start date' pick a date 'customer signed date' pick a date 'contract term' enter a numerical value 'customer signed by' select an existing contact or create a new one 'status' leave as default i e 'draft' 3 once the contract is created, edit the status field and set it to ' activated' to trigger the flow automation 4 within seconds, a contract pdf and excel file will be auto generated and attached to the record in the 'files' related list— no clicks needed you may need to refresh the page to see the changes the below image displays the 'contract' record page after the genration store generated files in connected external storage if you want to see how cloudfiles document management & sharing docid 3gglz90lgx5zfwkrgm7ra works alongside document generation docid\ cmqmhkrlb3mveyvyapv9c you can also generate files directly into connected external storage platforms (like sharepoint, google drive, one drive etc ) after setting the status field to 'activated' , open the cloudfiles widget in the files tab of the contract record you’ll find the generated files located in the connected external folder note if you don’t see a connected folder or the files haven’t appeared yet, simply refresh the widget or the page the below image displays the 'contract' template configuration the below image displays a sample 'contract' pdf file generated implementation this demo automation was configured using salesforce flows with generate document docid\ qfdwhv81mxgwsly7nppsc or generate document (sync) docid 9davjkiyvj2zfhjw7zcvx flow actions the below image displays the flow being triggered behind this demo for more information, please refer to doc generation flow actions docid\ nv27oftdk5ukedfzqpbpq beyond this test drive this example demonstrates one simple use case of automation — but the possibilities with cloudfiles flow actions are truly extensive you can initiate generation using any trigger — field updates, user actions, stage changes, or conditions in a flow generate multiple file formats — including pdf, word (docx), excel (xlsx), and powerpoint (pptx) automatically store documents in salesforce or push them to external storage like google drive, sharepoint, onedrive etc use dynamic variables populated via flows to insert runtime values — even if they're not stored in salesforce fields chain actions such as email alerts, file sharing, approval processes, and task creation generate documents in batch using the generate document (batch) docid\ xahb umkpvgfm3k4ycbdp flow action — perfect for mass reporting or bulk generation enforce advanced pdf security controls such as disabling printing or editing, locking form fields, setting view/edit passwords etc with just a few clicks in flow builder, doc generation flow actions docid\ nv27oftdk5ukedfzqpbpq empower you to build sophisticated document generation workflows without writing a single line of code there are other test drives available that might be of interest to you as well head back to the test drive docid\ cgjldtde3usa oibbwgpn article to continue testing