Built in 14 min

I Rebuilt Closely in 14 Minutes — Here's the Prompt

Closely charges $99/month for LinkedIn outreach automation. We rebuilt the core AI message drafting in 14 minutes using PlugThis. Same workflow, bring your own OpenAI key, ~$5/month total.

By Udaya PrakashJune 8, 202611 min read

Closely — at a glance

Visit Closely

LinkedIn profile with AI Message Draft button next to standard message button

The tool we rebuilt

Closely is a LinkedIn sales outreach platform with a strong Chrome extension at the core. Sales teams use it to: send personalized connection requests at scale, draft AI-powered messages based on prospect profiles, run multi-step follow-up sequences, and track responses. It sits in the same category as Closely-but-broader tools like Apollo, Outreach, and Reply.io.

Pricing is steep: $99/month for the Pro tier with enough seats and features to actually use for sales. Enterprise tiers go higher. The reason the price holds up is that sales teams treat this as a revenue tool — if it generates one extra deal a quarter, it pays for itself many times over.

The interesting question is what the Chrome extension actually does that the sales team can't do without it. The honest answer: Closely's core extension functionality is AI message drafting based on profile data scraped from LinkedIn. That's it. The sequencing, response tracking, and CRM sync are valuable but happen on Closely's backend — they're not what the extension itself does.

The Chrome extension portion is rebuildable. The backend automation portion (sequences, response tracking) is not, without serious server-side infrastructure. The rebuild covers the high-leverage piece: AI-powered personalized message drafting.

Worth being honest: this rebuild has the strongest cost case in the entire series but the weakest feature coverage. You're saving $94/month, but you're also giving up genuinely useful features that the rebuild can't replicate (sequence automation, team-level response tracking). Read this as "core message drafting at a fraction of Closely's cost, plus you can build out custom features over time," not as "drop-in replacement."

What I built

A Chrome extension that adds an "AI Message Draft" button to every LinkedIn profile. Clicking the button opens a popup with: goal selector (Intro / Partnership / Hire / Sales), tone selector (Formal / Casual / Friendly), and an optional context textarea. The extension scrapes the profile data and asks OpenAI GPT-4 for three personalized outreach message variations. Pick one, it auto-populates LinkedIn's message input.

Closely rebuild — message composition popup with three AI-drafted outreach variations

It took 14 minutes — longer than other rebuilds because LinkedIn's DOM is complex and finding the right selectors for profile data and the message input takes care.

Output: Manifest V3 extension, 5 files, about 290 lines of code.

A note on LinkedIn's terms of service: LinkedIn doesn't ban Chrome extensions that read profile data or compose messages. They do ban extensions that send messages at scale without user interaction, scrape data into external databases, or simulate human behavior at high speed. This rebuild stays well within acceptable use — it requires manual user interaction per message and scrapes only the profile the user is actively viewing.

The prompt I used

PlugThis prompt

Key design decisions in the prompt:

Manual send required. LinkedIn bans automation of message sending. The extension only drafts and populates — the user clicks send. This is the difference between a useful tool and one that gets your LinkedIn banned.

Personal context in settings. Every outreach message should mention what you do, not just what they do. Storing your role/company/value-prop in settings means every generated message reflects you accurately without you re-typing it each time.

Custom templates per goal. The AI's default outreach style is generic. Users with proven templates that work for them can override the AI — pass their templates as additional context in the prompt.

Three variations, not one. The first AI-generated message is rarely the best. Showing three variations lets the user pick the one that sounds most like them. Pick one, edit it manually, send. The whole flow stays human-controlled.

How it works

Content script runs on LinkedIn profile pages. It uses MutationObserver to detect when the profile loads (LinkedIn is a single-page app with delayed rendering). Once profile content is detected, it injects the "AI Message Draft" button.

The button uses LinkedIn's own visual styling (matching the existing Message button) by copying CSS classes from LinkedIn's DOM. This makes the integration feel native rather than overlaid.

Profile data scraping uses LinkedIn's stable selectors (the ones that haven't changed in the last 18 months). Profile name comes from the h1 tag. Current title and company from the headline section. Past roles from the experience section (top 3 most recent). Skills from the skills section if visible. About text from the about section.

LinkedIn occasionally updates these selectors. The rebuild handles this by:

  1. Wrapping each scrape in try/catch — if any field can't be found, it returns null and the AI prompt gracefully handles missing data
  2. Logging warnings (not errors) for missing fields so the user knows when something has changed
  3. Encouraging users to file issues on the GitHub repo if scraping breaks (this becomes community-maintained)

Popup is the main UI. When the "AI Message Draft" button is clicked, it opens the extension's popup (the small panel that opens from the toolbar). The popup loads the scraped profile data and presents the goal/tone/context selectors.

On Generate, the popup sends a message to the background worker with all the data.

Background worker constructs the prompt and calls OpenAI. The system prompt template:

You are helping the user draft a personalized LinkedIn outreach message. 

About the user: {{personal_context}}

About the recipient:
- Name: {{recipient_name}}
- Current role: {{current_title}} at {{current_company}}
- Past roles: {{past_roles_summary}}
- Skills: {{skills_list}}
- About: {{about_text}}

User's goal for this outreach: {{goal}}
Preferred tone: {{tone}}
Additional context from user: {{user_context}}

Generate three distinct message variations. Each should be 50-100 words. Each must reference at least one specific detail from the recipient's profile (their role, a past company, a skill, or something from their about section) to demonstrate personalization. End each variation with a clear call-to-action matching the goal.

Return as JSON: { variations: [{ id: 1, text: "..." }, ...] }

The background worker parses the JSON response and sends the three variations back to the popup.

Popup renders variations as cards. Each has Copy and Use this buttons. "Use this" sends a message to the content script: "open the message compose for this profile and populate with this text."

Content script (continued) opens LinkedIn's message compose UI (programmatic click on the Message button), waits for the textarea to render, then populates it with the chosen message using document.execCommand('insertText', false, message).

The user reviews, edits if needed, and clicks send manually. The flow is intentionally human-in-the-loop.

Cost breakdown — the strongest cost case (with caveats)

Cost comparison: Closely $99/month vs PlugThis at $34/month total

Paid subscription

Closely Pro subscription

/mo

Per-seat pricing scales with team size

Build with PlugThis

PlugThis Starter + BYOK

/mo

API: $3-8/month at typical usage (50-150 messages)

Single user; for teams, costs scale with seats but stay much lower than Closely

The math is the strongest in the entire series:

PlugThis Starter at $29 + $5 API = **$34/month** total.

Closely Pro at $99/month — almost 3x the cost.

Annual savings: ~$780/year per user.

The caveat: the rebuild covers core message drafting only. Closely's full value includes:

  • Sequence automation (auto-send follow-ups after N days if no reply)
  • Response tracking (parse LinkedIn inbox, identify replies)
  • Team-level analytics (which messages perform best across the team)
  • CRM integration (sync conversations to HubSpot/Salesforce automatically)
  • A/B testing message variants at scale

The rebuild doesn't replicate these. If they're the core of why your team uses Closely, the rebuild isn't a replacement — keep paying for Closely.

If what your team uses Closely for is primarily the AI message drafting (which is, in our experience, where most of the actual value lives), the rebuild covers 80% of that for 30% of the cost. The remaining 20% (sequences, tracking, CRM) you can build incrementally as separate extensions or skip if not critical.

For solo sellers or small teams running modest outreach, the rebuild is genuinely a Closely alternative. For 10+ person sales teams with sophisticated sequencing needs, Closely's value still holds.

Side-by-side feature comparison

Before

Closely Pro subscription

  • AI-powered message drafting on LinkedIn profiles
  • Multi-step sequence automation
  • Response tracking and inbox parsing
  • Team analytics and A/B testing
  • CRM integration (HubSpot, Salesforce, Pipedrive)
  • $99/month per seat
  • Server-side infrastructure manages everything
After

PlugThis-built extension

  • AI-powered message drafting on LinkedIn profiles
  • Sequence automation: needs separate extension/build
  • Response tracking: not included; LinkedIn ToS limits this
  • Personal analytics only (chrome.storage history)
  • CRM sync: add via custom API integration (~30 min build)
  • $29 PlugThis + ~$5 API = ~$34/month per seat
  • Local-first, you own all data

The honest gap: response tracking and sequence automation. These are real Closely features that require backend infrastructure to do well. The rebuild's response-to-engagement: track which messages you sent (chrome.storage) and let you manually update each one with the response status. Lower-fidelity than Closely's automation but works for solo sellers.

Customization ideas

Customization settings showing template library, A/B testing toggle, and CRM integration options

Industry-specific templates. Customize prompts per recipient industry. "If the recipient works in fintech, mention regulatory compliance angle. If healthcare, mention HIPAA awareness." The system prompt can branch based on inferred industry.

Voice training. Add 10 examples of your past successful messages to the system prompt. The AI matches your voice rather than generic outreach style.

Goal-specific templates. Override the AI for goals where you have proven copy. "For partnership outreach, use this exact template format but personalize the [BRACKETS]."

Mutual connection prompts. If the profile shows mutual connections, automatically reference them in the message. "I see you know [X] — we worked together at..."

Recent activity awareness. Scrape the recipient's recent LinkedIn posts. If they posted about [topic] in the last 30 days, reference it in the message. Shows you're paying attention.

CRM integration. Add a settings panel for HubSpot/Salesforce/Pipedrive API tokens. On message send, create a contact in the CRM with the LinkedIn profile data and message text. ~30 minutes additional build.

Reply tracking via Gmail. Detect LinkedIn notification emails in Gmail (LinkedIn sends "X replied to your message" emails). Mark the original message as "got a reply" in extension storage. Lower-fidelity than Closely's inbox parsing but works.

A/B testing personal templates. Track which message variants get replies (manual update). Over time, identify your best-performing templates.

The path from this rebuild to a full Closely-equivalent is incremental. Each feature is 30 min to 3 hours of additional building.

Try it yourself

Drop the prompt into PlugThis. In settings, enter your OpenAI API key and your personal context (your role, company, value prop). Load into Chrome.

Open any LinkedIn profile, click "AI Message Draft", pick a variation, send manually. About 14 minutes from prompt to working extension.

A note on responsible use: this tool exists to draft personalized messages faster, not to spam at scale. Respect recipient time. Personalize meaningfully. Send fewer, better messages.

The Closely rebuild has the strongest cost savings ($65/month/seat) but the weakest feature parity. It works as a Closely alternative for solo sellers and small teams focused on personalized message quality. For larger sales orgs with sophisticated sequencing needs, Closely's subscription value is still real.

Compare side-by-side

PlugThis vs Closely — full breakdown

Closely alternative — build your own LinkedIn outreach Chrome extension with PlugThis. from $29/month, your own automation rules.

Read the full comparison →

Other rebuilds

Build your own

Paste the prompt above into PlugThis and ship your own version in minutes.

Open the builder