Using BrowserCloud with Zapier
Prerequisites
- A BrowserCloud account with an API token
- A Zapier account (paid plan required for webhooks)
Available Endpoints
Screenshot
The /screenshot
endpoint allows you to capture screenshots of web pages. This is useful for:
- Visual monitoring of websites
- Creating thumbnails
- Documenting web content
Webhook Configuration
- Add Webhooks by Zapier to your Zap
- Choose POST as the event
- Set URL to
https://chrome-v2.browsercloud.io/screenshot?token=YOUR_API_TOKEN_HERE
- Set Payload Type to
JSON
- Add these data fields:
url
:https://www.example.com
PDF Generation
The /pdf
endpoint generates PDF documents from web pages. This is useful for:
- Creating printable versions of web content
- Archiving web pages
- Generating reports
Webhook Configuration
- Add Webhooks by Zapier to your Zap
- Choose POST as the event
- Set URL to
https://chrome-v2.browsercloud.io/pdf?token=YOUR_API_TOKEN_HERE
- Set Payload Type to
JSON
- Add these data fields:
url
:https://www.example.com
Content Extraction
The /content
endpoint extracts the HTML content from web pages. This is useful for:
- Web scraping
- Content analysis
- Data extraction
Webhook Configuration
- Add Webhooks by Zapier to your Zap
- Choose POST as the event
- Set URL to
https://chrome-v2.browsercloud.io/content?token=YOUR_API_TOKEN_HERE
- Set Payload Type to
JSON
- Add these data fields:
url
:https://www.example.com
Function
The /function
endpoint allows you to execute custom JavaScript code in a browser context. This is useful for:
- Custom browser automation
- Complex data extraction
- Multi-step workflows
Webhook Configuration
- Add Webhooks by Zapier to your Zap
- Choose POST as the event
- Set URL to
https://chrome-v2.browsercloud.io/function?token=YOUR_API_TOKEN_HERE
- Set Payload Type to
Raw
- Set Content Type to
application/javascript
- Add JavaScript code to the Data field:
export default async function ({ page }) {
await page.goto("https://example.com/");
const url = await page.content();
const buffer = await page.pdf({ format: "A4" });
const base64PDF = buffer.toString('base64');
const screenshot = await page.screenshot({ encoding: "base64" });
return {
data: {
url,
screenshot,
base64PDF
},
type: "application/json",
};
}