Document Generation
...
Generating Documents
Automate Document Generation using HubSpot Workflows
8 min
introduction you can automate the creation of documents using the generate document action in hubspot workflows this allows documents to be generated automatically when specific workflow triggers or conditions are met, eliminating the need to manually generate documents from the cloudfiles widget on individual records with this action, documents can be generated using predefined templates and automatically stored in your connected cloud storage such as sharepoint, google drive, onedrive or dropbox to make sure this action works with your cloud storage, you need to understand docid 9ibd0tgbyrtn kgjpxhtn this automation is particularly useful for processes such as automatically generating contracts when a deal reaches a specific stage creating invoices after a deal is closed generating onboarding documents when a contact lifecycle stage changes the generate document action takes several parameters that define which template should be used and where the generated document should be stored template id the template id specifies which cloudfiles document template will be used to generate the document destination library the cloud storage where the generated document will be stored (e g sharepoint, google drive, onedrive, box, dropbox, or cloudfiles) path to destination folder the exact folder path where the generated document will be saved the path can be defined using a ’/’ separated string and can be personalized using hubspot record tokens convert to pdf determines whether the generated document should be converted to pdf or saved in the same format as the template these parameters have been detailed in the sections below 1 template id each template created with cloudfiles has a unique template id that identifies it during automation when the workflow runs, cloudfiles uses this id to locate the correct template and generate the document based on the data available in the hubspot record the template id can be found on the https //hubspot cloudfiles io/w/dg/templates in the cloudfiles web interface 2 destination library the destination library defines the cloud storage location where the generated document will be saved cloudfiles supports multiple storage providers such as sharepoint, google drive, onedrive and dropbox depending on the selected library, additional parameters such as drive id may be required 3 shared drive id / drive this is important for google drive & sharepoint library selection both these cloud storage have multiple drives where files can be stored e g google drive has my drive & shared drive while sharepoint can have multiple drives inside multiple sites this parameter helps cloudfiles identify which drive to save the generated file 4 path to destination folder the path to destination folder specifies the exact location within the selected cloud storage where the generated document will be saved this path should be provided as a ’/’ separated string representing the folder structure the folder path can be copied from the metadata section in the cloudfiles dashboard and can be personalized using hubspot record tokens to dynamically organize generated documents based on records info to copy path to destination folder and drive id from cloudfiles dashboard, follow the steps below open cloudfiles dashboard https //hubspot cloudfiles io/ and login if prompted under the libraries tab, navigate to the folder where you want to save the generated document copy the parameter from the metadata on the right side of the screen 5 convert to pdf the convert to pdf parameter determines the format in which the generated document will be saved when enabled, the generated document will be automatically converted into pdf format otherwise, the document will be saved in the same format as the original template 6 return values the generate document action returns the following values these can be used in later actions to chain together actions and create complex automations 1 action status this is a success or failure message based on whether the action executed correctly need help? book time with our team of experts
