Hi @umutcankurt , I’ve finally downloaded and imported your workflow.
If you are going to hit the website multiple times, I suggest you add some delays in between each request. You can do this directly in the GET Request:
It takes values in milliseconds (ms), so in my example, I’m setting a 3 seconds delay between each request (3000 ms).
From your Table Creator, I see that you have 6 pages only (0 to 5). Are you only interested in the first 6 pages? I checked the website, and it has 200 pages in total (0 to 199). If you want all, and you want to create the URLs manually, there is a simpler way to do this:
First of all, I want to define some variables:
For the URL_template
variable, I define this:
https://sam.gov/api/prod/sgs/v1/search/?random=1642699126203&index=opp&page=##PAGE##&sort=-modifiedDate&size=50&mode=search&responseType=json&is_active=true¬ice_type=o
As you can see, I define a place holder called ##PAGE##
for the page values.
I also define a variable called page_end. I assigned the value 6 to reflect that you have (0-5). But if you want to get all 200 pages, just change this value to 200, and it will create URLs with page from 0 to 199 (200 pages).
We run the Variable Creator and we check the values:
After that, create an empty table using the Empty Table Creator, but with the 0-5 Rows:
I then generate the URLs using the ROWID of the empty table and the URL_template via the String Manipulation:
And just for fun, let me show you how easy it is to generate 200 URLs:
Just change the value in the Variable Creator to 200:
And that’s it. Just run the String Manipulation, and BANG!:
After that, just connect them to the test that I did. Just need to configure the GET Request like this:
And here are the results for 6 pages:
You can then apply your JSON Path, etc.
Here’s what the workflow looks like:
Here’s the updated workflow: String to JSON help to fix the error.knwf (13.9 KB)
A word of advice: If you are building your workflow, run this with only ONE page. Once your workflow is properly built, only then you run it with multiple pages.