Microsoft 365 OneDrive Input
Microsoft 365 OneDrive Input tasks allow the processing of files from any of the organization's Microsoft 365 OneDrive accounts.
This task uses the Microsoft Graph API.
For this task to function correctly, Workflow needs to be granted application permissions for Microsoft Graph in the organization’s Azure instance.
It needs read access to the Users category (User.Read.All
) so that the task can identify the users in the organization.
In addition, the Files.ReadWrite.All
permission is required so that the task can create the folder if it doesn't already exist.
For more information on setting application permissions for Microsoft Graph, see https://docs.microsoft.com/en-us/graph/auth-v2-service.
Input
The Microsoft 365 OneDrive Input task retrieves files corresponding to a specified file mask, from a specified OneDrive folder. These files may be of any format, even formats that are not readable by Connect Workflow.
Processing
The task uses the Microsoft Graph API to access OneDrive folders in the organization (subject to that organization's IT policies).
Each file captured by the input is sent down through the process, one at a time. When the file is finished, the process goes back to the input which feeds another file down, as long as there are files in the queue. Once all the files are gone, the task polls the input folder again to see if new files are present and, if so, the process continues with these files. Otherwise, the process ends.
Note: The MS Graph REST API is limited to a certain number of requests within a certain period of time. This is called throttling. When throttling comes into play, the plugin receives HTTP response 429. The plugin will log the error and retry, but it exits with an error after 15 unsuccessful attempts.
Output
The output to this task is a series of individual files, one after the other. These files are not modified in any way from when they are captured from the source folder.
Job Information definitions
-
%1 - User. This is the OneDrive user's ID.
-
%2 - Source File Name. Contains the file name (excluding path but including extension) of the file name that is captured. Equivalent to using the %o system variable.
-
%3 - Folder: Contains the folder from which the data was captured.
Task properties
General Tab
-
Folders: Enter the full path of a folder from which the input files are to be taken. The first / refers to the root folder. For its subfolders, the first / is optional.
This is a variable property field. You can use any combination of text, variables and data selections; see Variable task properties.
Click the Add button to add the folder to the list. Note that subfolders of the given folders are not taken into account; if they need to be monitored, they must be added to the list separately.
When a folder doesn't exist in the system it will be created at runtime. -
Masks: Enter a single or multiple file names or use file name masks (separated by a semicolon). See Masks.
-
Treat as regular expressions: When ticked, the contents of the Mask field are deemed to be a regular expression . You can specify multiple masks based on regular expressions, separating the regular expressions by a semicolon.
The checkbox is not ticked by default. Please refer to Regular Expressions for more information.
Note: No Variable Data can be used inside this field if the Treat as regular expressions option is ticked. The percent sign, the curly brackets and the period are all key elements of the RegEx syntax, therefore they cannot be mixed and matched with Workflow variable data syntax (e.g. %1, ${global.myvar}, etc.). Also, there is no validation of the RegEx being specified.
-
Connection
-
Application ID: Enter the application ID provided by Azure for this specific application. This value is static and cannot contain variables.
-
Application Password: Enter the client secret (key) for the Azure app. This value is static and cannot contain variables.
-
Tenant ID: Enter the Tenant ID as specified in Azure. This value is static and cannot contain variables.
-
User ID: This is the OneDrive user's ID. This value is dynamic. You can use any combination of text, variables and data selections; see Variable task properties.
-
Use delegated permissions: Select this option to use delegated permissions instead of application permissions. Delegated permissions allow the application to log in as a standard registered user, and IT can grant that user account access to specific inboxes and specific OneDrive folders.
Application permissions can be restricted to a strict minimum to ensure the plugin can perform its tasks, but no more. However, application permissions apply to all accounts in the organization: if the application has been granted permission to read emails, then that permission applies to all email accounts in the organization, and if it has access to OneDrive, it has access to all folders.
Advanced properties
To get access to the following properties tabs, right-click the plugin in the process and select Advanced Properties.
"Other" Tab
- Job Information group
- Information elements: Indicates what Job Info variables are automatically created by the input task.
- Add lines before first data page: Using the arrows keys you can add any job information directly at the beginning of your data file.
- Backup input files: Check this to save a copy of each data file that is captured by your input. These files are saved in the PlanetPress Workflow Tools working folders under the "Backup" folder.
To navigate quickly to the Workflow working folders, press the keyboard shortcut CTRL+ALT+Shift+F4 from within the Workflow configuration tool.
The number of days to keep backups of jobs processed by input tasks is set per process; see Process properties. - Backup filename: Enter the file name that you wish the input data file backup to be saved under.
- Delete Existing Metadata: Check to remove any Metadata from memory. This option is disabled on initial input tasks, and is checked by default on secondary input tasks.
On Error Tab
For a description of the options on the On Error tab see Using the On Error tab.
Miscellaneous Tab
The Miscellaneous tab is common to all tasks.
It contains a text area (Task comments) that lets you write comments about the task. These comments are saved when the dialog is closed with the OK button and are displayed in The Task Comments Pane.
Check the option Use as step description to display the text next to the icon of the plugin in the Process area.
The tab also provides an option to highlight the task in The Process area with the default color, set in the Preferences (see Colors), or the color selected or defined under Highlight color on this tab.
To revert the selected highlight color to the default color, open this tab, turn the Highlight option off and close the dialog with the OK button; then turn highlighting back on.
Highlighting can also be turned on and off via the task's contextual menu and with the Highlight button on the View ribbon.