mittwald icon

mittwald

Interact with mittwald mStudio API

Actions409

Overview

This node operation, "File Get File," is designed to retrieve a file by its unique identifier from the mittwald mStudio API. It is useful in scenarios where you need to programmatically access stored files, such as downloading user-uploaded documents, fetching media assets for processing, or integrating file retrieval into automated workflows.

For example, you might use this node to:

  • Download a PDF report generated and stored in the system.
  • Retrieve an image file to attach it to an email.
  • Access protected files by providing an authentication token.

The node supports specifying how the file should be returned (as raw binary or base64 encoded text) and how it should be presented (inline or as an attachment).

Properties

Name Meaning
File Id The unique identifier of the file to be retrieved.
Accept The desired format of the file content returned: either raw binary (application/octet-stream) or base64 encoded text (text/plain;base64).
Content Disposition How the file should be handled by the client: displayed inline (inline) or downloaded as an attachment (attachment).
Token An optional authentication token required to access protected files.

Note: The properties Accept, Content Disposition, and Token are available both as HTTP headers and as query parameters, allowing flexibility depending on the API requirements.

Output

The output contains the file data in the json field. Depending on the selected Accept property:

  • If application/octet-stream is chosen, the file content is returned as raw binary data suitable for direct saving or further binary processing.
  • If text/plain;base64 is selected, the file content is returned as a Base64-encoded string within the JSON, which can be decoded later.

If the file is protected, the provided token ensures authorized access.

Dependencies

  • Requires an API key credential for authenticating with the mittwald mStudio API.
  • The node uses the base URL https://api.mittwald.de.
  • Proper configuration of credentials in n8n is necessary to authorize requests.

Troubleshooting

  • Invalid File Id: If the file ID does not exist or is incorrect, the API will likely return a 404 error. Verify the file ID before making the request.
  • Unauthorized Access: For protected files, missing or invalid tokens will cause authorization errors. Ensure the correct token is provided.
  • Incorrect Accept Header: Using an unsupported Accept value may result in unexpected responses or errors. Use only the supported options.
  • Content-Disposition Misuse: Setting attachment when inline display is expected (or vice versa) may affect how clients handle the file. Choose appropriately based on your use case.

Links and References

Discussion