Research LinkedIn profiles and write personalized messages for any LinkedIn message type — connection requests, InMails, DMs, message requests, post comments, and comment replies. Takes LinkedIn URLs as input, researches each person (profile data + recent posts via Apify), and generates messages tailored to each lead's background, interests, and recent activity. Exports tool-ready CSVs for Dripify, Expandi, Botdog, PhantomBuster, or generic format. No LinkedIn cookies or login required.
npx gooseworks install --all # then, in Claude Code, Cursor, or Codex: /gooseworks use the linkedin-message-writer skill
Research LinkedIn leads and write personalized messages for any LinkedIn message type. Takes LinkedIn URLs, researches each person using Apify (profile + recent posts), and writes messages based on what it finds.
No LinkedIn cookies. No database setup. Just LinkedIn URLs in, personalized messages out.
Load this skill when:
Required for researching LinkedIn profiles and posts. Set in .env:
APIFY_API_TOKEN=your_token_hereNo LinkedIn cookies, login, or session tokens needed. Apify handles scraping without any LinkedIn credentials.
That's it. One env var. Nothing else.
This skill writes any text-based LinkedIn message type. Each type has different constraints.
| Message Type | Who Can Receive | Character Limit | When to Use |
|---|---|---|---|
| Connection request | 2nd/3rd degree connections | 200 (free) / 300 (premium) | First touch. Must earn the accept. No selling. |
| InMail | Anyone (requires premium credits) | Subject: 200, Body: 1,900 | Standalone pitch to people who won't accept cold connections. Senior execs, busy people. |
| DM | 1st-degree connections only | 8,000 | Follow-ups after connection accepted. Conversational, not broadcast. |
| Message request | Group members, event attendees, #OpenToWork | 8,000 | Warm context — you share a group or event. Reference the shared context. |
| Post comment | Anyone (public posts) | 1,250 | Warm-up before connecting. Show you engaged with their content. Not a pitch. |
| Comment reply | Anyone (in a thread) | 1,250 | Engage in a conversation they started. Add value, don't pitch. |
Connection request (200/300 chars):
InMail (subject 200 + body 1,900 chars):
DM (8,000 chars):
Message request (8,000 chars):
Post comment (1,250 chars):
Comment reply (1,250 chars):
Ask the user these questions. Skip any already answered.
Leads:
Message type: 3. What kind of LinkedIn message do you want to write? (connection request, InMail, DM, message request, post comment, comment reply, or a sequence of multiple types) 4. If connection request: do you have a free or premium LinkedIn account? (affects character limit: 200 vs 300)
Goal: 5. What's the objective? (book meetings, drive demo requests, get replies, build relationships, promote content, warm up before outreach) 6. What's the angle or hook? (pain-based, hiring signal, competitor displacement, event-based, content engagement, mutual connection, cold)
Tone: 7. Which tone? Present options:
Context: 9. What does your company/product do? (one-liner for the AI to work with) 10. Any proof points? (customer names, metrics, case studies to reference)
Output: 11. Which LinkedIn outreach tool do you use? (Dripify / Expandi / Botdog / PhantomBuster / Just give me a CSV)
Accept leads from whatever source the user provides:
linkedin_url, LinkedIn URL, LinkedIn, profile_url, url). If ambiguous, ask the user which column.Minimum required: At least one LinkedIn URL per lead.
Present the lead count to the user and confirm before proceeding to research.
Research each lead using two Apify actors. Both require only APIFY_API_TOKEN — no LinkedIn cookies.
Use harvestapi/linkedin-profile-scraper to get profile data for all leads.
API call:
curl -X POST "https://api.apify.com/v2/acts/harvestapi~linkedin-profile-scraper/runs?token=$APIFY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"urls": [
{"url": "https://www.linkedin.com/in/PROFILE_1/"},
{"url": "https://www.linkedin.com/in/PROFILE_2/"}
]
}'Cost: $0.003 per profile. 100 leads = $0.30.
Returns per lead:
Polling for results:
# Check run status
curl "https://api.apify.com/v2/acts/harvestapi~linkedin-profile-scraper/runs/{RUN_ID}?token=$APIFY_API_TOKEN"
# When status is SUCCEEDED, fetch results
curl "https://api.apify.com/v2/datasets/{DATASET_ID}/items?token=$APIFY_API_TOKEN"Use harvestapi/linkedin-profile-posts to get recent posts. Run this when:
Skip this when:
API call:
curl -X POST "https://api.apify.com/v2/acts/harvestapi~linkedin-profile-posts/runs?token=$APIFY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"profileUrls": [
"https://www.linkedin.com/in/PROFILE_1/",
"https://www.linkedin.com/in/PROFILE_2/"
]
}'Cost: $0.002 per post. ~20 posts per profile = ~$0.04 per lead. 50 leads = $2.00.
Returns per post:
Polling: Same pattern as Step 1.
After research completes, present a summary table:
Leads researched: {count}
Profile data: {count} profiles retrieved
Posts scraped: {count} posts from {count} leads (or "skipped")
Research cost: ~${total}
Sample leads:
| Name | Title | Company | Recent Post Topic | Personalization Angle |
|------|-------|---------|-------------------|----------------------|
| Jane Smith | VP Sales | Acme Corp | Posted about AI in sales | Reference her AI post |
| ... | ... | ... | ... | ... |If the user asked to filter/qualify leads, do that now based on profile data (title, company, industry, etc.) and present which leads made the cut.
Generate personalized messages for each lead based on the research.
Use the best available signal for each lead. In order of strength:
If the user provided reference messages that have worked, analyze those for tone, length, structure, and vocabulary. Use them as the template — don't override with defaults.
After generating any message, count the characters. If over the limit:
Generate a CSV with these columns:
linkedin_url, first_name, last_name, company, title, message_type, message_subject, message_bodyFor sequence-based campaigns (connection + follow-ups), use:
linkedin_url, first_name, last_name, company, title, connection_request, followup_1, followup_2, followup_3, inmail_subject, inmail_bodyDripify:
Profile URL, Note, Message 1, Message 2, Message 3Expandi:
LinkedIn URL, Connection message, Follow-up #1, Follow-up #2, Follow-up #3, InMail subject, InMail messageBotdog:
linkedin_profile_url, connection_note, message_1, message_2, message_3PhantomBuster:
profileUrl, messageGeneric CSV / Other:
Save to the current working directory:
{campaign-name}-{YYYY-MM-DD}.csvPresent final summary:
Campaign: {name}
Message type: {type}
Leads: {count}
Tool: {dripify/expandi/etc.}
Personalization: {profile-only / profile+posts}
Research cost: ~${amount}
Export file: {file_path}Show 3-5 sample messages from the export for final review.
Do NOT mark as done without explicit user confirmation. Ask: "Messages look good? Anything to adjust before you import?"
After confirmation:
| Leads | Profile Only | Profile + Posts |
|---|---|---|
| 10 | ~$0.03 | ~$0.43 |
| 50 | ~$0.15 | ~$2.15 |
| 100 | ~$0.30 | ~$4.30 |
| 500 | ~$1.50 | ~$21.50 |
Profile scraper: $0.003/profile. Post scraper: ~$0.04/lead (20 posts × $0.002).
| Error | Fix |
|---|---|
APIFY_API_TOKEN not set | Ask user to add it to .env |
| Apify run fails or times out | Retry once. If still fails, skip that lead and note it. |
| LinkedIn URL is invalid or profile not found | Skip the lead, report it to user |
| 0 profiles returned | Check URL format — must be full LinkedIn URL with https:// |
| Post scraper returns 0 posts | Person doesn't post publicly. Use profile data only for personalization. |
Render a 'model comparison grid' video from a config — a fal-style "same prompt, N contenders" showcase — a dark real-DOM stage where per beat a monospace prompt fades in centered, docks to a small top strip, then a labeled 2-4 panel grid (static images OR muted video clips, mixable per cell) staggers in and holds for comparison, plus a minimal end card — frame-stepped via Playwright (video cells are frame-seeked deterministically) and encoded with FFmpeg. Deterministic assembly, FREE (cell media comes from create-image-fal / create-video-fal, music from create-music-elevenlabs), text stays pixel-crisp. Use for the model-comparison-grid format.
Render a punchy ~12s vertical (9:16) music-only direct-response OFFER ad as a 4-beat kinetic-typography film — HEADLINE slam → real PRODUCT drop → CLAIM/proof → CTA pill — from one config of copy slots, a real product photo, a brand palette, fonts, bpm, and beat split. DETERMINISTIC + FREE (a bundled Remotion project; springs + interpolate, no AI-gen for visuals). Backgrounds are engine gradient divs off the palette, props are inline SVG, the ONLY composited bitmap is the REAL product photo (objectFit:contain, never stretched), and ALL headline/claim/CTA/URL/wordmark text is typeset in the engine — never AI-rendered (the format's credibility guard). A driver binds the config to Remotion input props, renders the 9:16 master, and derives a 1:1 center-crop with ffmpeg. Two gating checks run before render (claim verbs must match the product's physical format; the claim beat needs an edge-entry mechanism prop). Use for the motion-graphics-offer-ad format.
Assemble a myth-vs-fact kinetic-typography explainer video ad (≈29.5s, 9:16) from N myth/fact pairs + hook / turn / punch copy + palette + a brand end-card PNG + a VO track — a hook, 3 red-strike MYTH cards that flip to teal-check FACT cards (per-line strikethrough that crosses EVERY wrapped line), a "what actually works" turn, an optional proof reveal, a punch line, and a static end card. DETERMINISTIC assembly with ZERO AI-gen visuals — HTML hyperframes rendered frame-exact via Playwright (`window.renderAt(t)`, animation a pure function of beat-local time), Whisper beat-snap to VO word onsets, concat at a uniform fps, karaoke `.ass` captions burned last (suppressed on the proof + end-card beats), and a VO + optional music mix (music −20 dB, `amix normalize=0`, tail fade). FREE (Python + Playwright + ffmpeg); the recipe supplies the copy / palette / end-card / VO and gates the paid VO / music / Whisper calls to their own capabilities. Use for the myth-vs-fact format.