Hi Power Automate community,
I am working on a flow that extracts data from the Jira REST API. From the JSON returned, the relevant fields are filtered and placed into a csv file which is then placed onto a mailing list.
The flow I created worked successfully, however it only ever returned a maximum of 100 Jira issues.
To overcome this I have been advised to apply pagination into my flow. From looking through the forums I came across a few examples and tried to implement this logic into my flow, however I am getting various errors.
Please see my full flow below:
The expression used in the condition connector (Which is most likely wrong) is currently =
When I run the flow "Do Until" either takes way to long, Or I am presented with errors:
A sample of the JSON output from the HTTP connector is below:
Could anybody advise me on changes I must make to my flow for it to successfully extract more than 100 Jira issues.
Thanks
Solved! Go to Solution.
Hi @Automate123
Ok so I have created a JIRA account and tried. Here is the final working solution.
Below all the steps are under the Do Until loop.
Above my schema is as follows. I have removed the required validations. If you need those then generate the schema using your data from the API retrieval step.
Here is my schema
Hope it make sense. If you have any more questions please let me know.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHey @abm
The flow I tried to replicate was one that you posted on a similar issue. Any ideas how to get this flow to work and extract more than 100 Jira Issues?
Thanks
Hi @Automate123
I checked the documentation and you need to set a limit in your call then use the next attribute until it gives all the records. Please see below link.
Pagination in the REST API (atlassian.com)
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHi @Automate123
Ok so I have created a JIRA account and tried. Here is the final working solution.
Below all the steps are under the Do Until loop.
Above my schema is as follows. I have removed the required validations. If you need those then generate the schema using your data from the API retrieval step.
Here is my schema
Hope it make sense. If you have any more questions please let me know.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHey @abm
Thanks a lot for the response and providing clear instructions/screenshots, it really is appreciated!
I have copied the flow with an additional few extra steps which are using the select connector to filter relevant fields, creating a csv table from this data and then emailing the csv file.
When I ran the flow it works, but I am now currently only getting emailed 50 records.
Under the condition could I ask what you set the yes variable as? I just assumed it would be IsNoMoreRecords = true
Please see the full flow below.
Sample of the email I received after running the flow with only 50 records:
Any ideas on why this is happening?
Could the extra steps I added after the condition effect the total number of records being returned?
Thanks
Hi @Automate123
Yes thats correct. I have updated the thread with the IF condition. Are you collecting all the results in an array something in the loop? The outside the loop you trying to create the CSV file? Basically collect all then outside the loop implement the logic of CSV and email.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHey @abm
Currently I am not collecting all the results in an array within the loop.
How would I go about doing that?
Yeah the extra steps I have added are all outside of the loop, see below:
Thanks
Hi @Automate123
You need to declare outside the loop a variable. Then append the results under the loop. Later outside the loop use the append array object to do the CSV and email.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHey @abm
I have tried to add that logic into my flow but am now getting an error under the initialize variable Issues Array action.
The extra connectors I have added can be seen below:
When I run the flow this is the error I am getting:
Here is a screen shot of the flow after the loop. These stages seemed to work in my old flow which only returned 100 Jira issues, however I think maybe some modifications are needed for them to work in this new flow:
Note: For the value of the issues object I used the FinalJson variable
Any ideas on how I can modify the later part of the flow to return all 148 Jira issues?
Thanks
Hi @Automate123
Your original request was how to get more records from JIRA API and clearly demonstrated that in my example. Its difficult to analyse unless you can do a screen share. I need to see your data and the whole logic.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHi @Automate123
Above I can see you have initialised after the Do until loop. That should be above the loop and inside you need the append action step to collect all the values.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHey @abm
Please find the screen shots from my message here as I could not attach for some reason.
Here I have added a variable before the flow FinalJson and an append to string variable within the flow.
Would this logic work in appending all issues into the FinalJson variable?
Thanks
Hi Mate,
Are you able to resolve your issue? Also looking for similar solution.
Have around 5K JIRA Issues , can you please help me.
Since , the flow doens't have all the steps.
Regards,
Venkat
Could you post another thread and explain your requirement?
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blog
have created a New Thread
Can you please help.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
70 | |
22 | |
18 | |
17 | |
13 |
User | Count |
---|---|
126 | |
37 | |
30 | |
28 | |
26 |