Solved

How to get a file from server directory to use in workflow for email attachment ?

  • 8 March 2019
  • 8 replies
  • 164 views

Badge +4

Hi,

 

I've uploaded a file with FileService SmartObject to a server directory. 

 

I need to attach that file in my workflow and send with email attachment.

 

How to get that file to use in my workflow ?

 

Thank you.

icon

Best answer by Widson 12 March 2019, 08:09

View original

8 replies

Good day Artiligent-Jump

 

Please follow this link https://help.k2.com/kb001394 to follow the step by step guide in achieving your solution.

 

Should this work please mark it as a solution or Kudo to help others with a similar challenge.

 

Thank You

 

Regards

Thabang

Good day Artiligent-jump

Files and File paths can get by using inline functions. I have attached a document explaining inline functions in detail and how to use them. This file also explains the different kinds of functions to be used and what they return. I would suggest looking at the GetFile and Files function. After the file was received you can use it in your workflow by following the steps that Thabang-96 provided.

 

If attachment does not download, please refere to this link:

https://community.k2.com/pfxaw45692/attachments/pfxaw45692/K2_blackpearl/18376/1/Inline%20Functions.pdf

If this post or the above posts answer your question, please remember to mark it as a solution.

Thank you
Regards
Jacques.

Badge +4

Hi Tabang,

 

Your link is not accessible. Do you have a correct link or another link ?

 

Thank you.

Badge +4

Hi Jacques,

 

Function "Get File From Location" is not available in new installation of K2 Five (not upgrade). So, do you have any idea ?

 

Thank you.

 

O.Adithep

Userlevel 4
Badge +13

Hello Artiligent-jump,


 


 On K2 Five, perhaps you can use a SmO to return the file data as a base-64 string to this inline function:


 


In the Context browser > Functions > Files > Get File From Content function. 


 


Please refer to our documentation below for more details on the Files functions available: 


http://help.k2.com/onlinehelp/k2five/userguide/5.2/default.htm#K2-Workflow-Designer/Use/ContextBrowser/Functions/Functions.htm


 

Good day Artiligent

 

My bad for the error link, please follow this one https://help.k2.com/kb001394

 

Thank You

 

Kind regards

Thabang

Hi Artiligent-Jump

 

This service broker allows you to upload directly to a file share or local file folder using a SmartObject. It has a single method to upload the file and it returns the path of the uploaded file. This can then be stored and used as a reference in your application.

 

File Service Broker v2.0

 

This custom service broker allows the user to perform the following functions based on a full file path

  • Read from a file
  • Write a file to a folder location
  • Delete a file
  • Get a list of full path files names from a directory
  • Get a list of full path sub-directory names from a directory

This custom service broker is based on the original File Service.

 

This attached document contains relevant steps required to achieve your goal.

 

Should you find this information helpful to your problem, kindly mark it as a "Kudo and/or Accepted Solution" as this will help others seeking for relevant information in future.

 

regards;

widson.

 

[K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member]

That's the source behind all https://community.k2.com/t5/K2-blackpearl/File-Service-Broker-v2-0/ba-p/92469?nobounce

Reply