File
In Monkedo, File is a core data type that enables a wide range of possibilities in automation by allowing users to work directly with files—reading, creating, modifying, and integrating files within automation workflows. File components make it easy to upload, download, extract, or compress files, and even to convert data between formats. Let’s explore how you can make the most of File capabilities in Monkedo.
In Monkedo, setting file inputs is straightforward and can be done in two ways: manually or dynamically. For manual uploads, the component input provides a file upload method, where you can select and upload files directly to the component, making it easy to use files that you have readily available, as shown below.
Alternatively, for dynamic file inputs, you can connect outputs from other components or external sources to feed file data directly into a component’s input. This is useful when working with files that are created or obtained within the automation flow, ensuring a seamless integration of files without needing to manually upload them each time.
File Operations
Section titled File OperationsCreating Files
Section titled Creating FilesMonkedo provides several options for creating files from various sources:
Create File: This component allows you to create a file from provided data, such as a text block or structured information from your automation.
Example: You can create a text file containing daily log information from other components. Use the resulting file as an attachment in a report email or upload it to cloud storage.
Create File From Base64: This component is useful when working with Base64-encoded data (commonly used for image files in APIs). It converts the Base64 string into a file format that can be processed by other Monkedo components.
Example: You receive a Base64 image string from a web form. Convert it to a standard image file format (e.g., PNG) for easy storage or attachment to an email.
Create File From Table: This component generates files from data tables within Monkedo, allowing you to save structured data in formats like CSV or Excel for external use.
Example: Use this to save filtered sales data from a table to a CSV file and attach it to an email sent to the finance team.
Reading Files
Section titled Reading FilesMonkedo provides components to retrieve file content for use in automations:
Get Content: This component reads the content of a file and returns it, making it available for use in text processing or further analysis.
Example: Read a text file containing meeting notes, then parse the content to extract key insights or add specific items to a list of tasks.
Get Lines: For text-based files, this component breaks the content into lines and returns them as a list. This is especially useful for processing files line-by-line in an automation.
Example: Import a list of email addresses from a text file, then iterate over each line to add the addresses to a subscriber database.
Converting Files
Section titled Converting FilesMonkedo’s file components support file-to-data and data-to-file conversions:
Create Table From File: This component takes a CSV or similar spreadsheet file and converts it into a table within Monkedo, making it easy to manipulate or analyze the data.
Example: Import a CSV file with customer data, then use automation to clean or enrich the data by connecting it to other data sources.
Get Content as Base64: This component converts a file’s content to Base64, which is useful when working with APIs or applications that require Base64-encoded data.
Example: Read an image file, convert it to Base64, and send it in a POST request to an API.
Uploading and Downloading
Section titled Uploading and DownloadingGet File from URL: This component retrieves a file directly from a URL and makes it available for use within Monkedo automation. This is a quick way to bring in external files.
Example: Download a product catalog PDF from a given URL and email it to a customer list.
Get File URL: For files created or used within Monkedo automation, this component generates a URL link, which can be shared or used in messages. The link remains active only for the automation run or until the automation is completed.
Example: Create a PDF report and get a temporary link to upload it to another app that accepts URLs instead of direct uploads.
Processing
Section titled ProcessingMonkedo allows you to process files by compressing, extracting, and gathering metadata:
Compress Files: This component creates a compressed archive (such as ZIP) from multiple files. This is useful for bundling files before sending or storing them.
Example: Compress monthly financial reports into a single ZIP file and email it to an external accounting team.
Extract Archive: This component decompresses archives, supporting formats like ZIP, RAR, and TAR. Extracted files are available individually for processing or use within automation.
Example: Download a ZIP file with images, extract it, and then process each image file for use in an automation.
Get File Info: For metadata purposes, this component retrieves information about a file, including its name, size, and unique ID. Metadata can be used in reporting or logging.
Example: Track the size of uploaded files to ensure they meet storage limits before uploading them to cloud storage.
Image Processing
Section titled Image ProcessingMonkedo offers various components for essential image processing tasks within automations. Here are some key components and their applications:
Add Text: Overlay text on images, perfect for adding branding or informative labels to product images automatically.
Convert Image: Change image formats, such as converting PNGs to JPGs. This ensures compatibility with apps requiring specific formats.
Create QR Code: Generate QR codes with the "Create QR Code" component. This is useful for encoding URLs or product information, enabling quick access for users.
Extract Text: The "Extract Text" component scans images to capture text, making it ideal for extracting details from documents or receipts.
Resize Image: Quickly resize images using the "Resize Image" component to fit platform requirements, ensuring consistency in social media or website uploads.
Example Use Case: In an automation where users upload images, Monkedo can resize, watermark, and convert formats automatically, streamlining the entire workflow.
For a complete list of available image components, check the component selector in Monkedo and search for "Image" sub-category.
App Integrations
Section titled App IntegrationsMonkedo enables seamless integration with various applications to handle common file types like PDFs, images, text files, and sound files. You can connect to apps specializing in tasks such as PDF editing, image resizing, or format conversion.
To find suitable components for your file operations, simply use the search functionality in the component selector. Enter relevant keywords, and Monkedo will display available components and integrated apps that can assist with your needs.
Files in Automation
Section titled Files in AutomationFiles can be dynamically integrated into automations, allowing you to create complex workflows such as:
Using Files in Email: Files can be added as email attachments. This makes it easy to send dynamically created reports, extracted data, or user-generated content to recipients directly from an automation.
Example: Generate and attach a summary report file to a weekly status update email sent to project stakeholders.
Using Files in API Requests: Files created or processed within Monkedo can be sent to other systems via API requests, especially if an application accepts files in Base64 format.
Example: Convert a file to Base64 and send it to an external API that stores uploaded files.
File Lifetime
Section titled File LifetimeMonkedo is designed for transient file handling, meaning files exist only for as long as they are needed. Some time after the automation run is complete, files created during the automation run are automatically deleted.
When a file is uploaded manually to a component while creating or editing an automation, it will remain accessible until the automation is deleted. Similarly, files created or downloaded during the automation run will only be available for the duration of that specific run. If you need to keep any important files, you should upload them to a separate application or download them at the end of the automation. Let's explore these two options.
Uploading to Other Apps
Section titled Uploading to Other AppsTo keep files beyond their temporary existence, Monkedo integrates with various storage applications, which can be explored on the Monkedo Storage Integrations page. Additionally, you can upload files to other apps not specifically designed for storage, such as task management or messaging applications. Sending files via email to yourself or another person is another option, though it's important to note that most email services impose a limit of 25 MB per file.
Downloading Files
Section titled Downloading FilesIn Monkedo, you can provide a result for an automation run to be viewed after the end of an automation run. This result can be a message and any data including files. This data is displayed in a popup window when running an automation manually or inspecting results on the Run Statistics page. The End Automation component under Flow Control category is used to set the automation result.
Here is an example automation that exports tasks from a task management app and writes them into a spreadsheet file. The file is provided as the result of the automation.
Since this automation uses the manual trigger, it can be run using the Run button in the Automations page as shown below.
The automation result will provide the message and the data (the file) we provided to the End Automation component in addition to other run details as shown below.
Since files generated during the run are not permanently stored, it’s crucial to download them in 5 minutes after the run concludes. This approach works best for automations triggered manually, such as generating reports or exporting data on demand.
Tip: To simplify downloading multiple files, consider using the Compress Files component to bundle them into a single ZIP file. Otherwise, if you have tens or hundreds of files to download, you'll need to download them one by one.
Conclusion
Section titled ConclusionFiles add tremendous flexibility and functionality to your automations in Monkedo, from creating data files, reading external content, to handling complex processing. For a complete view of available file-related components, check the editor’s component selector to see the entire list.