Zum Inhalt springen

Automation

File and document steps

Work with files in a workflow. Attach files to records, edit images, create PDFs from templates, build spreadsheets and CSV files, and handle ZIP archives.

Diese Seite wurde noch nicht übersetzt. Sie lesen das Original.

These steps read and write files on records, change images and PDFs, build spreadsheets and CSV files, and turn a document template into a PDF.

Files on a record#

Files on a record live in a Files column. To read or write them, first point at the right place:

  • Attachment Scope from Entry points at one Files column on one record. Use it for every file the business keeps on a record.
  • Workflow Attachment Scope points at the workflow's own file library, open in the Files panel. Use it for files that belong to the workflow, such as a logo.
  • Select Workflow File picks one file from the workflow's library directly.

Then use these steps on that place:

StepWhat it does
List AttachmentsLists the files, as they are right now.
Get AttachmentLooks up one file's details by ID.
Download AttachmentLoads a file's content so other steps can use it, for example to send it in an HTTP request.
Upload AttachmentStores a file, such as a generated PDF, in the Files column.
Copy AttachmentCopies a file to another record or column.
Delete AttachmentRemoves a file from the column.
Get Attachment URLBuilds a download link for the file.
Break AttachmentSplits a file's details into name, type, size, and IDs.

The older Attachment Namespace from Entry (legacy) steps still work in existing workflows. Use Attachment Scope from Entry in new ones.

Generate a document#

Generate Document fills a published document template with values and turns it into a PDF. This is the best way to make invoices, delivery notes, certificates, and any other designed document.

  1. Add Generate Document and pick the Template. The step gets one input for each of the template's variables.
  2. Under Version, keep latest to always use the newest published version, or pick a specific version.
  3. Set the Filename. You can use variables, such as Invoice-{{invoice_number}}.pdf.
  4. To store the PDF on a record, turn on Upload to attachment and connect an Attachment Scope from Entry.
  5. Connect the template's variables to values from the record.

The step outputs the PDF file, its filename, and, if uploaded, the new attachment's ID. Pass the file to Upload Attachment to store it in another place, or send it to another system with an HTTP or FTP step.

Images#

Each image step takes an image and returns a new image or information about it.

GroupSteps
ChangeCompress Image, Resize Image, Convert Image, Crop Image, Rotate Image, Grayscale Image, Pad Image, Overlay Image, Image Thumbnail
Clean upStrip Metadata, Auto Orient
ReadGet Image Dimensions, Image Metadata, BlurHash

Use them when the business needs a specific size or format, such as a thumbnail for a catalog or a photo with location data removed. Keep the original as uploaded when nobody asked for a change.

PDF files#

StepWhat it does
Extract PDF TextReads the text of an existing PDF, for example to check it or copy it into a field.
PDF Page CountCounts the pages of a PDF.
Compress PDFMakes a PDF smaller, which helps most with scanned documents.
Create PDF, Open PDFStart building a new PDF or change an existing one. Add drawing steps on the body path, then save.

The drawing steps are PDF: Write Text, PDF: Write Heading, PDF: Write Image, PDF: Write Table, PDF: Add Page, PDF: Draw Rect, PDF: Draw Line, PDF: Move Cursor, PDF: Get Cursor, PDF: Set Page, PDF: Page Count, and PDF: Page Index. PDF Preview shows the PDF in the editor during test runs.

Tipp: For a designed document, such as an invoice, use a document template with Generate Document. It's much easier to design and change. The drawing steps suit simple PDFs whose layout comes from the data, such as a label.

Spreadsheets#

StepWhat it does
Create XLSX, Open XLSXStart a new workbook or open an existing one. Add the steps below on the body path, then save.
List XLSX SheetsLists the sheet names.
List XLSX RowsReads every row of a sheet.
Append XLSX RowAdds a row to a sheet.
Read XLSX Cell, Write XLSX CellRead or write one cell.

CSV files#

StepWhat it does
Create CSV, Open CSVStart a new CSV file or open an existing one. Add the steps below on the body path, then save.
Get CSV HeaderReturns the column names from the first row.
List CSV RowsReads all rows after the header.
Read CSV ChunkReads the next batch of rows. Use it for large files.
Append CSV RowAdds a row.
Read CSV Cell, Write CSV CellRead or write one cell.

Use a spreadsheet or CSV when someone else expects a file. If the data should become records in SAPUGO, write it with the data steps instead.

ZIP archives and text encoding#

  • Create ZIP bundles a list of files into one ZIP file.
  • List ZIP Entries lists what's inside a ZIP file, and Extract ZIP Entry pulls one file out.
  • Charset Decode and Charset Encode convert between file contents and text in a specific character set. Use them when a partner sends or expects files in an older encoding.

Audio and video#

Audio Metadata reads the duration and quality of an audio file. Video Metadata reads the duration and size of a video. They don't change the file.

Plan your file steps#

For every file the business keeps, name the Files column it goes into. Say where a generated document is stored or sent, and which template it uses. For a spreadsheet or CSV, name its columns and who receives it.

Kommen Sie nicht weiter oder fehlt etwas? Fragen Sie die Community.

Die Community fragen

Als Markdown anzeigenVerbesserung vorschlagen