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.
Ta strona nie została jeszcze przetłumaczona. Czytasz oryginał.
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:
| Step | What it does |
|---|---|
| List Attachments | Lists the files, as they are right now. |
| Get Attachment | Looks up one file's details by ID. |
| Download Attachment | Loads a file's content so other steps can use it, for example to send it in an HTTP request. |
| Upload Attachment | Stores a file, such as a generated PDF, in the Files column. |
| Copy Attachment | Copies a file to another record or column. |
| Delete Attachment | Removes a file from the column. |
| Get Attachment URL | Builds a download link for the file. |
| Break Attachment | Splits 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.
- Add Generate Document and pick the Template. The step gets one input for each of the template's variables.
- Under Version, keep latest to always use the newest published version, or pick a specific version.
- Set the Filename. You can use variables, such as
Invoice-{{invoice_number}}.pdf. - To store the PDF on a record, turn on Upload to attachment and connect an Attachment Scope from Entry.
- 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.
| Group | Steps |
|---|---|
| Change | Compress Image, Resize Image, Convert Image, Crop Image, Rotate Image, Grayscale Image, Pad Image, Overlay Image, Image Thumbnail |
| Clean up | Strip Metadata, Auto Orient |
| Read | Get 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#
| Step | What it does |
|---|---|
| Extract PDF Text | Reads the text of an existing PDF, for example to check it or copy it into a field. |
| PDF Page Count | Counts the pages of a PDF. |
| Compress PDF | Makes a PDF smaller, which helps most with scanned documents. |
| Create PDF, Open PDF | Start 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.
Spreadsheets#
| Step | What it does |
|---|---|
| Create XLSX, Open XLSX | Start a new workbook or open an existing one. Add the steps below on the body path, then save. |
| List XLSX Sheets | Lists the sheet names. |
| List XLSX Rows | Reads every row of a sheet. |
| Append XLSX Row | Adds a row to a sheet. |
| Read XLSX Cell, Write XLSX Cell | Read or write one cell. |
CSV files#
| Step | What it does |
|---|---|
| Create CSV, Open CSV | Start a new CSV file or open an existing one. Add the steps below on the body path, then save. |
| Get CSV Header | Returns the column names from the first row. |
| List CSV Rows | Reads all rows after the header. |
| Read CSV Chunk | Reads the next batch of rows. Use it for large files. |
| Append CSV Row | Adds a row. |
| Read CSV Cell, Write CSV Cell | Read 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.
Dyskusje o tej stronie
Masz problem albo czegoś brakuje? Zapytaj społeczność.