Workflow Actions
Generate Document Action
6 min
introduction the generate document action by cloudfiles allows you to automatically create documents using predefined templates within hubspot workflows using this action, documents can be dynamically generated based on hubspot data within your templates and generate file can be stored directly 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 the generate document action requires several parameters to define how and where the document should be created 1\ template id specifies which template should be used for document generation 2\ destination library the desired library where the file must be saved to (e g sharepoint, google drive etc ) 3\ path to destination folder the exact path to destination where the file must be saved to there may be more than one parameters required to specify this path based on library selection 4\ shared drive id / drive required for storage providers like google drive & sharepoint 5\ convert to pdf determines the output format of the generated document 6\ return values various values returned by this action after execution 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 choose for 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
