A hotel booking API is a fair example. Its rates call needs a transactionId header, forty hexadecimal characters, minted per session by the page's JavaScript. It is not a cookie, it is different on every load, and it is dead tomorrow. Paste one into a workflow and the call returns an error about an invalid parameter. The same call also needs the room ids for that hotel and the shape of the occupancy object, neither of which the workflow has any way to know. Writing that request by hand means discovering all of it, and rewriting it whenever the site changes. Taking it from the page means never knowing any of it.
// what the page sent, and what a workflow would otherwise have to reproduce
transactionId: 65731871cae58a4c884bd89693829712a423194a
X-Currency: USD
Saver: true
{"hotelCode":"DEHALAAA","checkInDate":"2027-01-17",
"roomIds":["BSTD------","PSUP------","PPRE------"],
"occupancies":[{"adults":2,"children":[]}],
Name the call with .WithCallFilter and ask for a template. The call blocks until the page makes a matching request, then hands it back as a GPALRequest: address, method, body, and every header the page's own code attached, minus the ones a browser owns and refuses to be told. The last match wins, because a page that calls an endpoint on load and again once the user has settled has settled by the last one. Then name a value with .WithTokenFor and it becomes a numbered blank, filled from a grid one row at a time. The key stays where it is and the value after it is replaced.
browser
browser
rates
browser
// "checkInDate":"2027-01-17" what the page sent
// "checkInDate":"{0}" after WithTokenFor
// "checkInDate":"2026-09-19" at fetch time, from the first column of the row
A page calls its API when it is ready to, not when the workflow is. Asking for a template waits for that to happen, up to thirty seconds, and hands back null if it never does, so the workflow decides what a missing template means.
WithTokenFor finds a named scalar: a query parameter such as name=value in a path or form body, or a JSON field such as "name": "value". That covers most of what a site's own front end sends. It does not cover a value that is a path segment rather than a parameter, a value inside an array, or a name used twice with different meanings, since every occurrence takes the same token. Nor does it help where a signature or hash covers the parameters, because changing one invalidates the signature and no templating fixes that. None of it is a dead end. Tokens are only text, and .Fetch has always taken them anywhere in a path, parameter, header or body, so a shape this cannot reach is one you write the token into yourself.
// the escape hatch: read the template, place the blank by hand
GPALRequest mine = (GPALRequest)GPAL
If a parameter is covered by a signature the front end computes, changing it breaks the signature. That is a property of the target rather than a gap in GPAL, and it defeats every replay approach equally.
Showing off some plain text in these paragraphs eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quo veniam mollitia excepturi animi eum illum non libero sapiente provident assumenda, delectus voluptatum nobis sed dolorem adipisci laudantium incidunt. Error, ratione?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quo veniam mollitia excepturi animi eum illum non libero sapiente provident assumenda, delectus voluptatum nobis sed dolorem adipisci laudantium incidunt. Error, ratione?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quo veniam mollitia excepturi animi eum illum non libero sapiente provident assumenda, delectus voluptatum nobis sed dolorem adipisci laudantium incidunt. Error, ratione?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quo veniam mollitia excepturi animi eum illum non libero sapiente provident assumenda, delectus voluptatum nobis sed dolorem adipisci laudantium incidunt. Error, ratione?
Here you can find different accents and emphasis sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
This is a link and how it could look like bestlinkinthebeautifulworld. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Here's just some classic bold text adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam notBoldSecondbestlinkinthebeautifulworld illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Obcaecati, iste distinctio veritatis eligendi laboriosam adipisicing elit illo nostrum corporis at adipisicing elit libero vel voluptas? Expedita, adipisicing facere dolores voluptatem ad ab rem assumenda soluta!
Other cuple of colors in case we want to emphasize several ways adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam adipisicing elit illo nostrum corporis at voluptatem libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta! Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quod veniam, quam ad expedita laborum sed at voluptates culpa ipsam ut vel. Ullam temporibus a mollitia quod aliquam ratione exercitationem nesciunt.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta! Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quod veniam, quam ad expedita laborum sed at voluptates culpa ipsam ut vel. Ullam temporibus a mollitia quod aliquam ratione exercitationem nesciunt.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Lorem ipsum dolor sit amet consectetur adipisicing elit. Repudiandae quas consequuntur illo numquam assumenda autem exercitationem distinctio perspiciatis in natus. Eius dicta similique ipsam ipsa minima, nemo quae enim tempore.
GPAL
.CallIfNotFound(GenericCallIfNotFound)
.WithPublishToConsole();
//System.Drawing.Rectangle windowSize = new System.Drawing.Rectangle(10, 10, 1500, 1024);
// NOTE: we have to set browser = before we execute any steps
// this is due to the 'GenericCallIfNotFound' which might throw an exception, and BankScraper will not have the browser set when it calls scraper.Close()
// until the complete fluent line gets executed (meaning every step, meaning browser is not set until everything else succeeds)
browser = GPAL.Browser
.WithBrowserType(Enums.BrowserType.Chrome)
.WithProfileDataDirectory(ChromeProfileLocation)
.WithUseAutomationEngine(AutomationEngine.Selenium)
.WithWindowSize(new System.Drawing.Rectangle(0,0,1920,1080))
.ToGPALObject();