Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Server Discussions

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

Make Alteryx App run automatically when different users upload Input Files to Gallery

vibes360
8 - Asteroid

I want to build an Alteryx App on Alteryx Gallery that is dependent on 5 input files which are managed by 5 people. I want the Alteryx App to run automatically only when the 5 Input files have been uploaded to Gallery by the 5 people managing the files. 

 

Please how can I design an app that will work in this automated way?

8 REPLIES 8
gabrielvilella
14 - Magnetar

You can do this, but it's not pretty. There is the option to schedule the workflow for a certain time and the workflow will just keep running waiting for all the files, you can use this tool here: https://github.com/bobpeers/Alteryx_SDK_EventTrigger 

NOTE: The workflow keep running indefinitely until the file is there, occupying a slot on the queue if you have it set to run multiple jobs at the same time. Depending on the amount of time it keeps waiting, the setting in System Settings might also kill the job because it is running for too long.

Another idea is that if you can have an external application constantly looking for the files, when they are ready it triggers the Server API call to queue the workflow for execution. This is the ideal scenario. 

vibes360
8 - Asteroid

Thank you for your reply @gabrielvilella . What external API can we use to trigger the Server API call to queue the workflow for execution?

gabrielvilella
14 - Magnetar

This one: /v1/workflows/{appId}/jobs

vibes360
8 - Asteroid

Happy new year @gabrielvilella Thanks. I used the Event Trigger Tool in my workflow for a file. Please which of the attributes of the tool can I use to know when a new change has been made to a file. I have attached a screenshots of the attributes of the Event Trigger Tool

 

vibes360_0-1672747271857.png

 

vibes360_1-1672747300030.png

vibes360_2-1672747352458.png

 

gabrielvilella
14 - Magnetar

That tool will just trigger if a file gets added to a folder. It does not check if there are changes within the file. To do this, you'd need to build a workflow that checks for those changes. 

vibes360
8 - Asteroid

@gabrielvilella Since my goal is to write to a database. How should I configure the Tool/ workflow that when it is run, if there are no changes to the file ,the workflow does not write to the database but when there is a change to the file it writes to a database?

gabrielvilella
14 - Magnetar

Read the two files, transpose the data if needed, join, compare the fields, filter when there is a change, update the database if true. 

vibes360
8 - Asteroid

Okay, I get your explanation. Thanks