Free Trial

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
SOLVED

Gallery API Filebrowser kind of support

Jaya
6 - Meteoroid

I need to implement the following use case - through our app, provide the user an ability to upload an input file(excel) and pass it through the Alteryx server via API, run the workflow and download the output file (again excel).

 

How can I achieve this as the API doesn't take in the File Browser as valid question?

 

9 REPLIES 9
jrgo
14 - Magnetar

Hi @Jaya,

 

Theoretically speaking, would you be able to just code your web app to ask for a file and store it then just tell Alteryx, via API, where to find it from? You can use a Text Box interface which would accept your string and just have it update the source field of the Input tool.

 

Again, this is theoretical, but hopefully this gives you some 'workaround' ideas!

 

Best,

 

Jimmy

Jaya
6 - Meteoroid

Hi @jrgo,

 

Thanks for responding. Here is what I understand and..

 

1. The Web app will ask the user to input the file (this is our intention as well).

2. Then the Web app will store the file in some location.

3. Update the workflow to take this file url as input.

4. Through the API question's response as an answer pass this URL and then the workflow will download the input file.

 

In our case, every user of our Web app will have different input files (we will be pulling data from particular tabs and particular columns) and hence there will be multiple copies of these input files to store, so this may not work for us.

 

- Jaya

jrgo
14 - Magnetar

Hi @Jaya,

 


@Jaya wrote:

 

1. The Web app will ask the user to input the file (this is our intention as well).

2. Then the Web app will store the file in some location.

3. Update the workflow to take this file url as input.

4. Through the API question's response as an answer pass this URL and then the workflow will download the input file. 

 

In our case, every user of our Web app will have different input files (we will be pulling data from particular tabs and particular columns) and hence there will be multiple copies of these input files to store, so this may not work for us.

 

- Jaya


For item 2 and your last paragraph regarding the multiple copies of a file, recommendation would be to have your web app generate a session specific GUID that would serve as the sub-directory of the main directory. This essentially will serve as the work space for your web app. From there, the web app can let the Alteryx API know exactly which file to use that resides in a specific directory.

 

For items 3 and 4, If your web server and Alteryx server can communicate natively within your network, i'd suggest just designing your Alteryx App so that the value passed through from the Web App to API would just update the file path of the regular Input tool. You can certainly do it with a Download tool, but you'd have to take extra steps/tools and some added complexity just to get the table in the workflow. That said, if they aren't able to communicate directly, then yes, this would be the best option.

 

Hope this helps, but please do keep me posted on the approach you end up going with!

 

Best,

 

Jimmy

Jaya
6 - Meteoroid

@jrgo,

 

Great!

 

For step 2 I am also thinking that we can ask our users to have predetermined location on their machine (some of our input files are sensitive) C:/Users/Alteryx/Input and build this into the workflow and have the download tool to take in the files (multiple excel files) from this location.

 

Do you think this is a viable option?

 

- Jaya

jrgo
14 - Magnetar

@Jaya,

 

I believe that this would cause more issues. Primarily because an end users machine doesn't have a web service to accept an http requests. Even If you fed it a full UNC network path, I think it would still be troublesome as it would require that the Alteryx server have access to that specific directory on their machine or the service account the Alteryx server is using be added to a policy group that grants full access to users computer file systems.

 

Technically, it is viable, but in my opinion, it's not an ideal option and may open more security holes than it closes.

 

Best,

 

Jimmy

Jaya
6 - Meteoroid

This can be one solution - i.e., uploading files to a Web server. I am also looking int uploading files Alteryx NAS share and it would be great if anyone can share more details on this.

 

- Jaya

Jaya
6 - Meteoroid

@jrgo

 

As suggested, I have started implementing the file share option (upload files to the server folder).

Can you please provide an example of how the below can be acheived...

 

You can use a Text Box interface which would accept your string and just have it update the source field of the Input tool.

jrgo
14 - Magnetar

@Jaya,

 

Attached is an example. As I mentioned on the comments, if the files types that are uploaded vary, you may have to add additional steps in your web app process to also pass the file type code in the same fashion as this. I don't have a list of file codes that Alteryx uses, but you can easily just update the Input tool to a different file type and look at the action tool to see what code it's showing now.

image.png

 

Good luck and let me know how this turns out!

 

Best,

 

Jimmy

avanibhatnagar
8 - Asteroid

@Jaya Hey Jaya - were you ever able to implement embedding your Alteryx Analytics app with File Upload option to your app where multiple users might upload files and need a specific output.