Storage Write

Overview

The Storage Write Node enables developers to store files in a structured way within the Document Storage system. This is particularly useful for organizing and managing important documents collected during workflow execution.

By using this node, developers can: ✅ Store uploaded documents in a pre-configured storage category. ✅ Ensure better organization by separating different types of documents (e.g., Identity Proofs, Financial Statements, Bank Statements). ✅ Retrieve stored documents later using the storageId returned by this node.

Common Workflow Pattern for Storage Write Usage

1️⃣ Accept documents in a workflow using the Upload Document Node → This generates a documentId. 2️⃣ Use the Storage Write Node to save the document under a specific storage category. 3️⃣ Store the returned storageId in Tables (or an external database) for future reference.

🔹 Example Use-Case: In a loan application processing system, AI agents collect KYC documents such as ID proofs, address proofs, and financial statements. These documents can be stored in separate storage categories for better accessibility and organization.

Configurations

Field
Description

Storage

Select the pre-configured storage where the file will be stored. This ensures documents are organized under specific categories.

Document ID

The unique document identifier received from the Upload Document Node. This is the input to the Storage Write Node.

Storage Path

Define the specific path within the storage where the document should be placed. This helps in better structuring and retrieval.

Execution Flow:

1️⃣ The Storage Write Node receives a documentId (generated by the Upload Document Node). 2️⃣ The document is saved under the selected storage category. 3️⃣ The node returns a storageId, which serves as a reference for future retrieval.

Output Format:

{
  "storageId": "fa5d0517-a479-49a5-b06e-9ed599f8e57a"
}
  • storageId → A unique identifier that can be used later to fetch the stored document.

Example Use-Cases

Use-Case 1: Storing KYC Documents for Loan Applications

A loan application workflow requires users to submit KYC documents (e.g., Passport, Address Proof, Bank Statements). These documents need to be stored in specific storage categories for structured management.

Configuration:

Field
Value

Storage

KYC Documents

Document ID

fa5d0517-a479-49a5-b06e-9ed599f8e57a

Storage Path

kyc/user_12345/

Execution Process:

1️⃣ User uploads their passport as part of the loan application process. 2️⃣ The Upload Document Node returns a documentId. 3️⃣ The Storage Write Node saves the document under the KYC storage category. 4️⃣ The node returns a storageId, which is then stored in Tables or an external database against the loan application.

🔹 Why use this approach? ✔ Keeps KYC documents structured for each applicant. ✔ Ensures secure, organized storage for future verification. ✔ Allows retrieval of stored documents during loan approval or audits.


Use-Case 2: Managing Financial Statements for Business Loans

A business loan application process collects financial statements (Balance Sheets, Profit & Loss Statements, etc.), which need to be stored separately for compliance.

Configuration:

Field
Value

Storage

Financial Statements

Document ID

b85c7029-df3a-49ab-a45e-3bdfb79d6b7a

Storage Path

business_loans/applicant_5678/

Execution Process:

1️⃣ The applicant uploads their company’s financial statements. 2️⃣ The Upload Document Node generates a documentId. 3️⃣ The Storage Write Node saves the document under the Financial Statements category. 4️⃣ The generated storageId is stored against the business loan record for future reference.

🔹 Why use this approach? ✔ Ensures regulatory compliance by keeping business financials structured. ✔ Facilitates quick retrieval during underwriting or risk assessment. ✔ Enhances security by categorizing different document types properly.


Use-Case 3: Archiving Processed Invoices in Document Storage

A company’s invoice processing workflow requires invoices to be stored systematically for audit and compliance.

Configuration:

Field
Value

Storage

Invoices

Document ID

c94a8223-ea5b-4cc5-b36f-7dcf54bfa2e4

Storage Path

invoices/processed/

Execution Process:

1️⃣ A supplier uploads an invoice for payment processing. 2️⃣ The Upload Document Node generates a documentId. 3️⃣ The Storage Write Node saves the document in the Invoices storage. 4️⃣ The storageId is stored in the finance system for future reconciliation.

🔹 Why use this approach? ✔ Creates a structured archive of financial documents. ✔ Ensures easy tracking of invoices for audit compliance. ✔ Streamlines retrieval when verifying payments or resolving disputes.

Key Takeaways for Developers

Structured Document Management – Allows developers to store documents in pre-configured storage categories, ensuring better organization and retrieval.

Seamless Integration with Workflows – Works in conjunction with the Upload Document Node to facilitate a complete document processing pipeline.

Improves Data Consistency – The generated storageId can be stored in Tables or an external database, ensuring document traceability in future workflow executions.

Flexible Storage Path Configuration – Developers can define custom storage paths, enabling logical separation of KYC files, financial documents, invoices, and more.

Supports Compliance and Auditing – By categorizing and structuring document storage, this node helps maintain audit trails and regulatory compliance for critical document handling processes.

By leveraging the Storage Write Node, developers can efficiently store, categorize, and retrieve documents across different workflow scenarios, ensuring seamless automation and better document lifecycle management. 🚀

Last updated