Integrations
Custom Scripts
Papercuts supports both Playwright and Puppeteer scripts to take action on your users behalf.
After users link their accounts to your app, you can access their sessions and run custom scripts, mimicking user interactions with the target websites.
Execute an automation script
First retrieve a webSocketUrl
to Playwright instance with the user’s session using create session endpoint. An example is shown here for LinkedIn.
Response
Use the webSocketUrl
received in response to connect with the Playwright instance using Chrome DevTools Protocol (CDP).
Connect to a playwright instance
This sample sets up a browser context mirroring the user’s session and runs a script to navigate directly to LinkedIn’s page.
You can then interact with the page as if you were the user, enabling actions like: