Append to File / AppendtoFile (internally is.workflow.actions.file.append)
description
summary
Adds the text passed as input to the end of the specified file.
note
If no file exists yet at the specified path, a new file will be created. Make sure to include a file extension (usually .txt) at the end of your path.
output
The file that was appended to
usage
AppendtoFile service=("iCloud Drive" | "Dropbox") filePath="string" mode=("Append" | "Prepend") makeNewLine=(true | false | variable)
arguments
service: Storage Service Picker (Docs)
Allows Variables: true
Accepts a string or variable containing one of the options:
- iCloud Drive
- Dropbox
filePath: Text (Docs)
Placeholder: "example.txt"
Allows Variables: true
Accepts a string or text with the text. Does not allow newlines.
mode: Enumeration (Docs)
Default Value: "Append"
Allows Variables: true
Accepts a string or variable containing one of the options:
- Append
- Prepend
makeNewLine: Switch (Docs)
Default Value: 
		true
		
Allows Variables: true
Accepts a boolean or a variable.
source json (for developers)
{
	"ActionClass": "WFAppendFileAction",
	"ActionKeywords": [
		"add",
		"text",
		"prepend"
	],
	"Category": "Documents",
	"CreationDate": "2017-03-13T05:00:00.000Z",
	"Description": {
		"DescriptionNote": "If no file exists yet at the specified path, a new file will be created. Make sure to include a file extension (usually .txt) at the end of your path.",
		"DescriptionResult": "The file that was appended to",
		"DescriptionSummary": "Adds the text passed as input to the end of the specified file."
	},
	"IconName": "Documents.png",
	"Input": {
		"Multiple": false,
		"Required": true,
		"Types": [
			"WFStringContentItem"
		]
	},
	"Name": "Append to File",
	"Output": {
		"Multiple": false,
		"OutputName": "Append to File",
		"Types": [
			"public.data"
		]
	},
	"Parameters": [
		{
			"AlwaysRequiresServiceResource": true,
			"AlwaysShowsButton": true,
			"Class": "WFStorageServicePickerParameter",
			"Key": "WFFileStorageService",
			"Label": "Service"
		},
		{
			"AutocapitalizationType": "None",
			"Class": "WFTextInputParameter",
			"Description": "The name or path of the file to retrieve. For example, if you are appending a file called “notes.txt” in a folder called “Public”, use “/Public/notes.txt”.",
			"DisableAutocorrection": true,
			"Key": "WFFilePath",
			"KeyboardType": "WebSearch",
			"Label": "File Path",
			"Placeholder": "example.txt",
			"Prefix": "/Shortcuts/",
			"TextAlignment": "Left"
		},
		{
			"Class": "WFEnumerationParameter",
			"DefaultValue": "Append",
			"Items": [
				"Append",
				"Prepend"
			],
			"Key": "WFAppendFileWriteMode",
			"Label": "Mode"
		},
		{
			"Class": "WFSwitchParameter",
			"DefaultValue": true,
			"Key": "WFAppendOnNewLine",
			"Label": "Make New Line"
		}
	],
	"ShortName": "Append to File",
	"Subcategory": "File Storage"
}