Introduction
Bardeen is a browser-centered automation tool that combines AI and visual actions. In 2026, it allows going beyond simple workflows by integrating JavaScript code for complex use cases. This tutorial guides you step by step to create reliable automations, from intelligent scraping to multi-tool synchronization. You will learn to structure professional playbooks while avoiding common pitfalls.
Prerequisites
- Bardeen extension installed (version 2026+)
- Account with Pro plan
- Basic knowledge of JavaScript
- Access to APIs (Notion, Slack, etc.)
Create a Custom JS Action
async function scrapeLinkedInProfile(url) {
const response = await fetch(url);
const html = await response.text();
const name = html.match(/<title>(.*?)<\/title>/)[1];
return { name, url };
}
bardeen.registerAction('scrapeProfile', scrapeLinkedInProfile);This JavaScript function retrieves the name from a LinkedIn profile. It is registered as a reusable action in Bardeen for your playbooks.
Configure the Playbook Trigger
{
"trigger": {
"type": "button",
"label": "Extraire Profil"
},
"inputs": {
"profileUrl": "string"
}
}This JSON file defines a manual trigger with a URL field. It serves as the foundation for all intermediate Bardeen playbooks.
Integrate the Action into a Playbook
const result = await bardeen.runAction('scrapeProfile', {
profileUrl: input.profileUrl
});
await bardeen.sendToNotion({
database: 'Prospects',
properties: { Name: result.name, URL: result.url }
});The code executes the scraping action then sends the data to Notion. Each step is asynchronous to avoid timeouts.
Add a Filtering Condition
if (result.name.includes('CEO')) {
await bardeen.notifySlack('#leads', `Nouveau CEO: ${result.name}`);
} else {
await bardeen.skip();
}This conditional filter sends a Slack notification only for relevant profiles, optimizing your automations.
Export the Complete Configuration
name: LinkedIn to Notion
version: 2026.1
triggers:
- type: button
steps:
- action: scrapeProfile
input: profileUrl
- action: filterCEO
- action: sendToNotionThis YAML file represents the entire exportable playbook. It facilitates versioning and team sharing.
Best Practices
- Always test JS actions in preview mode
- Use clearly named variables
- Limit API calls to 10 per minute
- Document every playbook in Bardeen
- Regularly save YAML configurations
Common Errors to Avoid
- Forgetting async error handling (timeouts)
- Not checking permissions on third-party APIs
- Creating overly long playbooks without modular steps
- Ignoring website rate limiting
Going Further
Explore Bardeen's advanced AI integrations and join our Learni training for hands-on workshops.