Is it Possible to Keep a Website Logged Into My Account for Future Use in Puppeteer?

This topic was automatically generated from Slack. You can find the original thread here.

Can I keep a website logged into my account for use in Puppeteer for future requests?

Puppeteer allows you to manage sessions and cookies, which can help you maintain a logged-in state for future requests. However, Pipedream’s built-in Puppeteer actions don’t provide this functionality directly. You can use a custom code step with Puppeteer to manage sessions and cookies, but you’ll need to handle the login process and maintain the session yourself. If you need further assistance or have any questions, feel free to ask.

: You can store the session cookie in the Pipedream Data Store.

So you could have workflows that use that cookie throughout the day, and one daily or weekly workflow that refreshes the cookie (so that the other workflows can keep working).

Hm, it seems like a good solution. I’ll see how I can implement that. Thank you!

Another option, if refreshing the cookie automatically is too difficult (ex: with services like Google, who proactively block crawlers), is to simply grab the cookie from the Chrome Dev Tools, and store it as a env var in Pipedream.

And then it can be manually updated once every X days.

It seems to have worked perfectly and in a simpler way than I had imagined. Thanks!