I bet that headline got your attention, and you’re probably saying, “That can’t be done.” Actually, it can….if you combine technologies. While I love being able to schedule workflows from the Alteryx gallery, there are many other mechanisms I would like to use to kick off Alteryx workflows, like receiving an email. Alteryx doesn’t allow this, but Microsoft Power Automate does. Combine that with the ability to call Alteryx from Power Automate Desktop and you have the ability to kick off workflows with email. Read on to learn more.
The Moving Parts
I named a whole lot of applications in my intro, and yes, there are a lot of moving pieces in order to trigger an Alteryx Workflow with email. I use four applications – Power Automate, Power Automate Desktop, Alteryx, and Azure Key Vault.
High Level Summary
So, how does it work? I use Power Automate first because Power Automate flows can be kicked off with email triggers. Then, I invoke a Power Automate Desktop (PAD) flow (from Power Automate) that contains actions to trigger an Alteryx workflow saved in the Alteryx Gallery. The PA and PAD flows incorporate secrets stored in the Azure Key Vault to build an API call.
The Power Automate Flow
I created an automated cloud flowing using When a new email arrives trigger. When an email with the subject “Gardendale For” hits the inbox, the Power Automate flow kicks off.
The Azure Key Vault
The API call to Alteryx requires a consumer key and a client secret. We store these values in the Microsoft Azure Key Vault. Then, the next steps in the Power Automate flow are Azure Key Vault actions to Get secret. Note, the values shown aren’t the secrets. They are simply the name of the secrets or a reference to the secrets. PA will use these names to pull the actual secret.
Azure Key Vault is a cloud service for securely storing and accessing secrets. A secret is anything that you want to tightly control access to, such as API keys, passwords, certificates, or cryptographic keys. Key Vault service supports two types of containers: vaults and managed hardware security module(HSM) pools. Vaults support storing software and HSM-backed keys, secrets, and certificates. Managed HSM pools only support HSM-backed keys. See Azure Key Vault REST API overview for complete details.https://docs.microsoft.com/en-us/azure/key-vault/general/basic-concepts#:~:text=Azure%20Key%20Vault%20is%20a,security%20module(HSM)%20pools.
Consumer key is the API key that a service provider issues to a consumer. The key identifies the consumer. A client secret is a secret known only to your application and the authorization server. It protects your resources by only granting tokens to authorized requestors.
The Power Automate Desktop Flow
Then, I use a PA action to Run a flow built with Power Automate for desktop. This action references a PAD flow called “Production – Gardendale Convert and Run Alteryx”. It also passes the secrets to the PAD flow, which uses them when building the API call. The other inputs you don’t have to worry about. They are specific to my use case.
Now, I don’t have a picture of the actual PAD flow that triggers the Alteryx workflow because it is 74 actions long and quite complex. I didn’t build it and can’t explain all 74 steps. One of my colleagues, Scott Galuska (GENIUS), figured this out. Major props to this guy for working out the actions. I can provide some links to get you started.
The Alteryx Workflow
Lastly, there is nothing special about the Alteryx workflow. It can be any workflow, as long as it is saved in the Gallery. PAD uses an API call to access it. Basically, accesses the workflow in the Gallery and clicks the Run button. You will need the last part of the Gallery URL. PAD uses this string to find the right workflow.
So with that said, now you know it’s possible to trigger Alteryx workflows with Power Automate actions like When email arrives. I’m just getting started in this RPA role but will be posting much more content on use cases that integrate Alteryx, Power Automate and Power Automate desktop.