MFilesComponent
This component connects Nappai to your M-Files Document Management System. It helps you find files, upload new documents, download existing ones, and manage versions. You can use it to automate tasks like checking documents in or out, searching for specific records, or removing old files. It acts as a bridge between Nappai and M-Files, making it easy to work with your documents without writing code.
How it Works
When you use this component, you tell it what you want to do and provide the necessary details, such as a file URL or a search term. The component then connects securely to your M-Files server using your credentials. It sends your request to M-Files, gets the result, and passes that information back to your workflow. You do not need to worry about the technical connections; the component handles the communication for you.
Connection & Credentials
This component requires configuring a credential in the Nappai panel before interacting with the external service:
- Go to the Credentials section in your Nappai panel.
- Create a new credential of the type M-Files and fill in the required fields (Base URL, Username, Password, Vault GUID).
- In your workflow, select the saved credential in the Credential input field of this node.
Inputs
Input Fields
- Operation: Select the operation to perform.
- Search By: Choose whether to search by name (full-text) or by object ID.
- Search Query: Text to search for in M-Files (full-text search across all object metadata).
- Limit: Maximum number of results to return.
- Mode: Custom: enter the Object ID manually. Dynamic: pick an object from a dropdown loaded from the vault.
- Object Type: M-Files object type. Options are loaded from the vault. Use the refresh button to reload them.
- Object ID: M-Files object ID (integer).
- Object: Select an object from the vault (filtered by Object Type). Use the refresh button to reload.
- File ID: File ID to download. Leave empty to use the first file attached to the object.
- File URL: URL of the file to upload (HTTP/HTTPS or data URI base64).
- Document Title: Title for the new document in M-Files. If empty, the filename is used.
- Check-in Comment: Optional comment describing the changes in this version.
Outputs
This component returns information about the action you performed. You can use these outputs to continue your workflow, check if everything worked, or pass data to other steps.
Output Data Example (JSON)json
{ “status”: “success”, “metadata_output”: { “object_id”: 12345, “title”: “Project Proposal.pdf”, “version”: 1, “properties”: { “Client”: “Acme Corp”, “Status”: “Approved” } }, “processed_file”: “file_handle_or_path” }
Connectivity
This component typically connects to other nodes that process document data or trigger actions based on M-Files results. Common connections include:
- Data Analyzers: To process metadata or content from M-Files documents.
- Storage Nodes: To save files found in M-Files to other locations.
- Notification Senders: To send alerts when documents are updated or found.
- Database Connectors: To sync document metadata with external databases.
Usage Example
Scenario: Search for Invoices and Download Them
- Set Operation to
Search. - In Search By, choose
Name. - In Search Query, type
Invoice 2024. - Set Limit to
5to find the first 5 matching invoices. - Connect the output of this component to a Download or Process node.
- The workflow will search M-Files for invoices and provide the details and files for the next steps.
Tips and Best Practices
- Development Mode: This component is currently in development. Please test your workflows carefully before using them with critical data.
- Refresh Button: When selecting Object Type or Object, click the refresh button if options do not appear, as these are loaded dynamically from the vault.
- Secure Credentials: Always configure your M-Files credentials in the Nappai panel. Never enter passwords or API keys directly in the workflow fields.
- Use Limits: Use the Limit field when searching to avoid processing too many items at once. This helps keep your workflow fast and efficient.
- Check Outputs: Use the Data output to verify the result of your action. If something goes wrong, the output can help you understand the error.
Security Considerations
- Credential Safety: Credentials are stored securely in the Nappai panel. Ensure the user account linked to the credential has only the permissions necessary for the tasks you are automating.
- Access Permissions: Make sure the M-Files account used in the credential has the right to perform actions like upload, download, or delete.
- Data Validation: The component validates inputs like file paths and object IDs. Ensure you provide correct data to prevent errors in your workflow.