Automatic Triggering of Workflow
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi everyone,
My Client wants to automate workflow based on when a new file is updated in the folder. My question is how to trigger the workflow. I can schedule them if there is a fixed time when the file is dumped in the folder, however that isn't the case.
Regards,
Deba
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
If you are familiar with Python you can write script which will observe your directory. If it detects file creation then it can run an Alteryx workflow.
You can use eg watchdog library http://thepythoncorner.com/dev/how-to-create-a-watchdog-in-python-to-look-for-filesystem-changes/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I tried understanding what the blog said but it is way beyond my scope as I am not much familiar with Python. Any easier alternative to this? Also found out a solution wherein it is saying I need to have Alteryx Automation license to resolve the same. Not getting any clear idea.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Deba93 ,
Not completely sure if this is the correct approach,
but you could build a base workflow which will keep polling (reading) the folder.
You can use a combination of Directory tool and other preparation tools to achieve this.
If this base file meets the condition, you could then trigger the main workflow (using Runtime EVENTS).
The triggering condition will ofcourse depend upon your specific requirement.
Regards,
Shreyansh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am not able to get that iterative portion of it. I am unable to convert directory tool into macro input as well. any further ideas as to how to iterate the workflow? or how to convert it to iterative macro?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi@Deba93
I've prepared complete python script that observes a choosen dir. Creating a file triggers Alteryx flow.
You must download a file, change his extension to "py". Set in file a path to your dir and your flow.
If you would like to run python script as daemon take a look at this solution:
https://stackoverflow.com/questions/50593200/flask-application-with-watchdog-observer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
thanks for the file. Few questions that I have are:
1. Can I simply copy paste the code into jupyter notebook?
2. Alteryx designer is installed in remote machine and jupyter notebook is installed in my local. How to get about this?
3. Will this line of code work for jupyter notebook? Screenshot below
4. Last one related to Alteryx Engine cmd. I read in the community that to access Alteryx Engine I need to have Alteryx Engine API license. Provided if I don't have that, what other thing can be done.
Regards,
Deba
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Unfortunately, my solution requires running a script on a machine with a designer and with an automation license.
Alternatively, you can use the Alteryx server API, but in this case the script needs to be modified.
If you dont have any of them, try with other solutions.
Good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Drussek Hi,
In order to trigger alteryx workflows via third party applications like python etc. is Alteryx Server license mandatory ?
Or do we have any other way to achieve this just by using the Alteryx Designer license.
And how can we trigger workflows via Alteryx Server API and is Server license required for this ?
Thanks for your response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Mahadeva
I would recommend checking out these posts:
https://medium.com/@cndro/kickstart-an-alteryx-workflow-with-an-alteryx-api-1a1dacd51e98
