October 30, 2025

Build Reliable Multi Step Automation Flows With Session Continuity

clock
4
min read
Copied!

Tom Shaked

linkedin
No items found.
Build Reliable Multi Step Automation Flows With Session Continuity

Modern websites are dynamic, personalized, and stateful. Every scroll, click, or filter can change what data is available, and those changes are often stored in cookies generated after the page finishes loading.

If your automation doesn’t capture those cookies, each request starts fresh. You lose session context, break workflow continuity, and end up collecting inconsistent data.

With Nimble’s get_cookies capability inside render_flow, you can now maintain the same live session across multiple requests, enabling true multi step automation that behaves like a real user session.

Why This Matters

Many automations don’t fail because of blocks or network issues. They fail because they lose context. A single missed cookie can change everything, such as page order, product filters, pagination, or user preferences.

This update solves that by letting you:

  • Capture cookies set dynamically during render
  • Reuse them across sequential requests
  • Keep filters, sorting, and other client side states consistent
  • Chain complex scraping or automation flows with zero manual cookie handling

It’s the difference between running independent page fetches and executing a continuous browser session.

How It Works

When you include get_cookies in your render_flow, Nimble renders the page, waits for scripts to finish, and collects any cookies the site sets during that process. You can then reuse these cookies in subsequent requests to preserve the exact same browser context.

Step 1: Capture cookies after render

import requests, base64, json

auth = base64.b64encode(b"user@example.com:your_password").decode()

payload = {
  "url": "https://www.example.com/search?q=laptops",
  "render": True,
  "render_flow": [
    { "get_cookies": { "timeout": 1000 } }
  ]
}

res = requests.post(
  "https://api.webit.live/api/v1/realtime/web",
  headers={
    "Authorization": f"Basic {auth}",
    "Content-Type": "application/json"
  },
  data=json.dumps(payload)
)

cookies = res.json().get("cookies", [])
print(cookies)

Step 2: Reuse cookies in the next request

next_payload = {
  "url": "https://www.example.com/page/2",
  "cookies": cookies
}

next_res = requests.post(
  "https://api.webit.live/api/v1/realtime/web",
  headers={
    "Authorization": f"Basic {auth}",
    "Content-Type": "application/json"
  },
  data=json.dumps(next_payload)
)
print(next_res.json())

The second request now runs under the same session, inheriting all context from the previous step.

Real Example: Maintaining Filter State on a Retail Site

Imagine you’re building a retail automation pipeline that navigates through search results, applies filters, and collects product details.

  1. The workflow begins by visiting the search page and applying a “Sort by Newest” filter.
  2. The website sets a cookie like sort_pref=newest after the filter loads.
  3. With get_cookies in your render_flow, that cookie is captured automatically.
  4. When the automation requests page 2 or 3 of results, it includes the same cookie, ensuring all pages remain sorted by “Newest.”

Without session continuity, page 2 would reset to the default order, breaking the dataset.

With it, your automation stays consistent, delivering clean and predictable data at scale.

When to Use It

This capability is ideal for any workflow that requires persistent state:

  • Pagination where each step depends on prior results
  • Multi page scraping flows that use filters or context cookies
  • Real time dashboards that require sequential API calls based on session state

Anytime you want your automation to act like a single, coherent browser session, this feature makes it possible.

Smarter Automation Starts With Context

Most automations fail quietly, not because of failed requests but because they miss what happens between them. Nimble’s cookie collection bridges that gap, allowing your Web API workflows to maintain context, capture accurate data, and behave like a real user moving through the web.

Start building automation that actually understands what happened before.

FAQ

Answers to frequently asked questions

No items found.