LogoLogo
Get support
  • Home
  • Make API
  • Make Bridge
  • White Label
  • MCP Server
  • Custom Apps Documentation
  • How to read the documentation
  • Make Apps Editor
    • Develop apps in Make UI
    • Develop apps in VS Code
      • Generate your API key
      • Configure VS Code
      • Create an app in VS Code
      • Set the app's icon in VS Code
      • Use general controls
      • Manage testing and production app versions
      • Develop apps collaboratively
      • Write IML tests
      • Local development for Apps
        • Clone Make app to local workspace
        • Develop app in a local workspace (offline)
        • Commit the changes in Git repository
        • Deploy changes from local app to Make app
        • Pull changes from Make app
        • Create a new app origin
        • Compare changes between local and Make app
  • Create your first app
    • Create your app
    • App's environment
    • Base
    • Module
    • Connection
    • Error handling
  • Debugging your app
    • Debugging of pagination in list/search modules
    • Debugging RPC
    • Debugging of Custom IML Functions
      • Debug IML in Web Browser
      • Debug IML in VS Code
  • Make DevTool
    • Live Stream
    • Scenario Debugger
    • Tools
  • Best practices
    • Names, labels & descriptions
    • Base
    • Connections
    • Modules
    • Action and search modules
    • Action modules
    • Search modules
    • Update modules
    • Trigger modules
    • Remote Procedure Calls
    • Static parameters
    • Mappable parameters
    • Processing of input parameters
    • Processing of output parameters
    • Groups
  • Useful resources
  • App logo
  • App visibility
  • App review
    • App review prerequisites
    • Request app review
    • Review status
    • Approved app
  • Terms of approved app maintenance
  • Updating your app
    • Private/Public apps
    • Approved apps
      • Tracking code changes
      • Approval of changes in approved app
      • Managing breaking changes
  • App structure
    • Base
      • Base URL
      • Authorization
      • Error handling
      • Sanitization
      • Advanced inheritance
    • Connections
      • Basic connection
      • JWT
      • OAuth 1.0
      • OAuth 2.0
    • Webhooks
      • Shared
      • Dedicated
        • Attached
        • Not attached
    • Modules
      • Action
        • Module Actions
        • Components
      • Search
      • Trigger (polling)
      • Instant Trigger (webhook)
      • Universal Module
        • REST
        • GraphQL
      • Responder
    • Remote Procedure Calls
      • Components
      • Types of RPCs
        • Dynamic Options RPC
        • Dynamic Fields RPC
        • Dynamic Sample RPC
      • Available IML Variables
    • Custom IML functions
      • Dynamic mappable parameters
      • Handling of full update approach in update modules
      • Removal of empty collections and nulls
    • Groups
  • App blocks
    • Communication
      • Making Requests
      • Multiple Requests
      • Handling Responses
        • Type
        • Valid
        • Error
        • Limit
        • Iterate
        • Temp
        • Output
      • Pagination
      • IML Variables
      • Request-less Communication
      • Multipart/form-data
      • Buffer
    • Static parameters
    • Mappable parameters
    • Interface
    • Epoch
    • Samples
    • Scope
    • Scope List
  • App components
    • Data Types
    • Parameters
      • Array
      • Boolean
      • Buffer
      • Cert
      • Collection
      • Color
      • Date
      • Email
      • Filename
      • Folder, File
      • Filter
      • Hidden
      • Integer, Uinteger
      • Number
      • Password
      • Path
      • Pkey
      • Port
      • Select
      • Text
      • Time
      • Timestamp
      • Timezone
      • URL
      • UUID
    • JavaScript in Make
  • Other
    • Processing of 'empty' Values
    • Processing of JSON strings inside a JSON object
  • Apps Marketplace Beta
    • About
    • How does it work
    • Terms and conditions
    • Tips and tricks
      • Control of access in apps using basic connection
Powered by GitBook

Resources

  • Academy
  • Community
  • Help Center

Useful links

  • Support
  • Privacy Notice
  • Status Page
  • make.com

Follow us

  • LinkedIn
  • X (Twitter)
  • Facebook
  • Instagram

© 2025 make.com

On this page
  • Specification
  • options
  • Examples
  • Result of RPC
  • Folder Selection
  • File Selection
Export as PDF
  1. App components
  2. Parameters

Folder, File

Folder and file selection

To choose a file instead of a folder, the desired option has to contain "file": true. When the field type is file, the file is required and only the folder is passed, the validation will fail.

Specification

options

  • Available types:

Type
Specification

string

A URL of RPC returning the list of folders or files.

object

A detailed configuration of folder/file list.

  • Available parameters:

Parameter
Type
Specification

store

string

An URL of RPC returning the list of folders or files.

ids

boolean

If set to true , you can work with folder IDs. That means that GUI loads previously selected folders and their labels after reopening the form without having to call the RPC again.

showRoot

showRoot

Default: true. If set to false , top-level folders aren't prefixed with / and there's no option to choose the root /. When the type is file , the root selection is blocked automatically.

singleLevel

boolean

Default: false. If set to true , only a single level of folders is available.

Examples

Result of RPC

To display the folder/file selector properly, the output from your RPC should contain only objects matching the following samples.

option

  • Available parameters:

Parameter
Type
Specification

label

string

A label to be displayed.

value

string

A value of an option which will be used in code.

file

boolean

Boolean to determine if the option is a file or a folder.

{
    "label": "Documents and Settings",
    "value": "documentandsettings"
}
{
    "label": "Document",
    "value": "document.txt",
    "file": true
}

Folder Selection

To make your folder selection work properly, you need to create a remote procedure that will return the corresponding folders. Each time a folder is selected, the RPC is called once again and the parameter path containing the whole path in the string is passed. You need to filter the folders inside this RPC.

[
	{
		"name": "home",
		"label": "Choose your home directory",
		"type": "folder",
		"options": {
			"store": "rpc://getFolders"
		}
	}
]
{
	"url": "/api/folders",
	"method": "GET",
	"qs": {
		"path": "{{encodeURL(parameters.home)}}"
	},
	"response": {
		"iterate": "{{body.data}}",
		"output": {
			"label": "{{item.name}}",
			"value": "{{item.name}}"
		}
	}
}

As you can see, this RPC will be called repeatedly each time the next item is chosen. The passed parameter (parameters.home in our case) will contain the full path, not only the last item! If you want to get only the last item, you should consider using a split IML function.

TIP: Because the folder path could contain slashes (/) which are also part of the URL, you may need to escape it using escapeURL IML function before sending the path in query string.

If the endpoint returns files too, you need to create a container and set condition in iterate directive. See the iterate collection below.

{
	"url": "/api/file,
	"method": "GET",
	"qs": {
		"path": "{{encodeURL(parameters.home)}}"
	},
	"response": {
		"iterate": {
			"container": "{{body.data}}",
			"condition": "{{item.type === 'folder'}}		
			},
		"output": {
			"label": "{{item.name}}"			
			"value": "{{item.name}}"
		}
	}
}

First call (no folders chosen yet)

[
    {
        "value": "usr",
        "label": "usr"
    },
    {
        "value": "srv",
        "label": "srv"
    },
    {
        "value": "home",
        "label": "home"
    }
]

Second call (passed path: /home)

[
    {
        "value": "make",
        "label": "make"
    },
    {
        "value": "guest",
        "label": "guest"
    }
]
"/home/make"

File Selection

The file selection is very similar to the folder selection, but keep in mind that files in your RPC result have to contain "file": true property. Each time a file is selected, the RPC is called once again and the parameter path containing the whole path in the string is passed. You need to filter the folders and files inside this RPC.

[
	{
		"name": "path",
		"label": "Pick a file to download",
		"type": "file",
		"options": {
			"store": "rpc://getFiles"
		}
	}
]
{
	"url": "/api/files/tree",
	"method": "GET",
	"temp": {
		"crumbs": "{{split(parameters.path, '/')}}"
	},
	"qs": {
		"directory": "{{get(temp.crumbs,length(temp.crumbs))}}"
	},
	"response": {
		"iterate": "{{body.data}}",
		"output": {
			"label": "{{item.name}}",
			"value": "{{item.name}}",
			"file": "{{if(item.type === 'file', true, false)}}"
		}
	}
}

The implementation of this RPC is quite similar to the getFolders RPC above. This RPC is called repeatedly each time the next item is chosen until the type of item is file.

Don't forget to check whether the item is file or folder and to set file property correctly inside the iterate directive.

TIP: Here you can see how to get the last item from the path. Some APIs may require the last directory as an input for getting a list of contents of that directory.

First call

[
    {
        "value": "Documents",
        "label": "Documents"
    },
    {
        "value": "myPaint.png",
        "label": "myPaint.png",
        "file": true
    },
    {
        "value": "contacts.csv",
        "label": "contacts.csv",
        "file": true
    }
]

Second call

[
    {
        "value": "secret.txt",
        "label": "secret.txt",
        "file": true
    },
    {
        "value": "plain.txt",
        "label": "plain.txt",
        "file": true
    }
]
"/documents/plain.txt"
PreviousFilenameNextFilter

Last updated 4 months ago