
"Simply put, a document workflow is any process you would use to handle incoming documents. As an example, and one I've built many times over the past few years, you can use a workflow to convert all your incoming documents into PDF for easier handling. pdfRest has APIs for this and I'll likely share a demo of them soon. (ColdFusion itself can convert HTML, PPTX, Word, and some image types to PDF natively.) In my demo, the workflow is simple:"
"The first part of the process simply finds the PDFs: sourcePDFs = directoryList(path=expandPath("../pdfs"),filter="*.pdf"); Now, I need to loop over each file, and for each, I look for a file with the same name, but a txt extension itself. This represents the cached summary: for(i=1;i<=sourcePDFs.len();i++) { // do we _need_ to analyze this? possibleTextFile = sourcePDFs[i].replace(".pdf",".txt"); possibleSummary = fileExists(possibleTextFile); writeoutput("<p><strong>Summary for #sourcePDFs[i]#</strong></p>"); if(possibleSummary) { summary = fileRead(possibleTextFile); writeoutput(summary); } else {"
A document workflow can convert and process incoming documents into a consistent format such as PDF for easier handling. The presented workflow scans a folder of PDFs, checks for an existing .txt summary per PDF, and reads cached summaries when present. For PDFs without summaries, the workflow uploads the file to Google Gemini GenAI, generates a summary, and stores the summary on the file system or in a database. ColdFusion can natively convert HTML, PPTX, Word, and some images to PDF, and pdfRest provides APIs for additional conversion needs. The implementation uses directoryList, fileExists, fileRead, and an uploadFile helper function.
Read at Raymondcamden
Unable to calculate read time
Collection
[
|
...
]