cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
mbakirov
Nintex Newbie

How to find all list workflows via API?

Happy  New Year to y'all!

The problem I am having is

I am trying to write some code that would allow me to import the same site or a list workflow into Office 365 .

We have 3 environments – DEV/TEST/PROD with identical structure.

 

We generally develop artifacts (forms and workflows) on dev, export them into our solution and then import them into TST and PROD.

 

I am trying to write code that would automate importing of list and site workflows.

 

Now the problem I am having is that you have 2 separate APIs, one to import a new workflow, and another to import on top of existing workflow. To import on top of existing workflow, I need to know it’s ID. In my experience, once you import a workflow from one environment to another, the ID changes so i cannot hard code the id in the code. Also, I do not know if my workflow is there yet or not ! 

 

I know, say, list url/id/title and I know the workflow title.

 

How can I check if the workflow with the specified name already exists and if it does, how could I find it’s id?

 

I tried to make a GET request to the URL https://{baseURL}/api/v1/workflows/packages (I have read this article https://help.nintex.com/en-US/sdks/sdko365/#Reference/REST/NWO_REF_REST_ExportWorkflow.htm%3FTocPath... and I thought it would be logical that you would provide an API to get all workflows), but it did not work.

Thank you! 

Labels: (1)
0 Kudos
Reply
3 Replies
TomaszPoszytek
Nintex Newbie

Re: How to find all list workflows via API?

Hi,

have you ever considered using Nintex Hawkeye? This tool will tell you what workflows you have in specific site collections and where they are located. You can as well create custom reports, so that you can get even more data about workflows.

Regards,
Tomasz
0 Kudos
Reply
peterbehler
Nintex Newbie

Re: How to find all list workflows via API?

I've had the same question.  In fact, someone in support sent me an .exe program that can query for workflows but it only works in classic sites and majority of my sites are all O365 Modern.

1. Does Hawkeye identify which site collections have workflows?  The problem is now we are going so flat and way too many site collections to keep tabs.

2. Hawkeye cost extra money just to find where people are creating workflows. When we get charge per workflow, but I get support telling me there is no tool for finding all of them.  It bothers me, specailly when you have a tool monitoring how many I have and what mode they are in.

0 Kudos
Reply
TomaszPoszytek
Nintex Newbie

Re: How to find all list workflows via API?

Hi,

True, the "KnowYourWorkflow" powershell script is intended for on-premise.

Yes, regarding the Hawkeye it can monitor workflows per site collection, but you need to add SCs you want to drill-down to the report. The general report just gives you an overview, e.g. how many workflows you have, where. But for the details you need to define lenses per site collection.

Hawkeye is free in Enterprise license. For the Standard is payed extra.

Regards,
Tomasz
0 Kudos
Reply