Page 1 of 1

Contents of file as private data

Posted: Mon May 15, 2023 2:30 pm
by JimmyHartington
I have a flow, where I would like the contents of my file set as private data, so I can use other functions in Switch.

Is there a native way to do this in Switch. I can not seem to find one.

It should be said I know this can be scripted, but I am just wondering if I have missed something basic.
Like I can the body of an e-mail with a Switch variable.
But I can not find a variable for the contents of a file.

Re: Contents of file as private data

Posted: Mon May 15, 2023 8:44 pm
by magnussandstrom
I'm not sure if I understand what you are looking for, but I use the app Run Command with the following settings to add text file content to private data:

Shell: Command Prompt (Default)
Command: type "%%InputFilePath%%"
Standard output private data tag: FileContent

I can then use the private data tag FileContent later in the flow to use the content of the text file.

Re: Contents of file as private data

Posted: Mon May 15, 2023 10:31 pm
by JimmyHartington
Thanks Magnus. I will try this because that is exactly what I need.

Re: Contents of file as private data

Posted: Tue May 16, 2023 9:25 am
by JimmyHartington
And it works just as I needed it to.