Back to guides
/Linked API

Claude Code for LinkedIn Marketing: A Weekly Content Workflow

Most "Claude for marketing" advice is about landing pages and reports. This guide is about the channel where B2B buyers talk in public every day – LinkedIn – and one workflow Claude Code can run there every week.

The short version. Claude Code can run the research-and-drafting half of LinkedIn marketing on a weekly loop: read what competitors and creators in your category posted, mine the comments for objections and buyer questions, write a one-page content brief, draft a post for you to edit, publish it once you approve, and then pull who engaged so the right people reach your CRM. Claude does the thinking and writing; the LinkedIn reads and actions come from a tool on your own account – Linked API's ready-made skill, its MCP server or its agent-friendly CLI. A person approves every post before it goes live.

What Claude Code can do for LinkedIn marketing

JobClaude's partThe LinkedIn tool behind it
ResearchRead and summarize what your category posted this weekPost search and a company's recent posts
AnalyseCluster themes, objections and the questions buyers askComments and reactions on the strongest posts
PlanWrite a one-page brief with angles and sources– (Claude alone)
DraftWrite a post in your voice– (Claude alone)
PublishOnly after you approve the draftCreate post
Follow upCheck each engager's current role and company, then decide who fits your buyerReactions and comments on your post, then person and company lookups

Claude has no LinkedIn access of its own. Everything in the right-hand column comes from a tool that works on your own account.

Give Claude access to LinkedIn

This is a short handoff – the setup pages cover it in full:

Your account runs in its own dedicated cloud browser at a human pace.

Tell Claude what you sell and how you write

Generic prompts produce generic posts. Give Claude one context file it reads before every run – marketing-context.md. The example below is illustrative: a made-up RevOps analytics company, used through the rest of this guide.

markdown
# Marketing context

## Product
Acme Analytics flags stale pipeline before forecast calls, for RevOps teams.

## Target buyer
- Head, director or VP of Revenue Operations
- Software companies with 50–500 employees
- Exclude: competitors (Example Rival, Other Rival), students, recruiters, job seekers

## Post objective
Start conversations with RevOps leads. Not reach, not followers.

## Category
Phrase to research: "pipeline forecasting"
Competitors to watch: Example Rival, Other Rival

## Voice
- Short sentences. First person. One idea per post.
- No emojis, no hashtags beyond two, no "game-changer" or "unlock".
- Three of my past posts, for tone:
  1. <paste a past post>
  2. <paste a past post>
  3. <paste a past post>

Five minutes on this file is the difference between a draft you edit and a draft you rewrite.

The weekly workflow, step by step

  1. Research. Claude searches LinkedIn posts on your category phrase from the past week, sorted by latest, and reads each competitor's recent Page posts. The full listening method – brand mentions, competitors' people, what each search can and cannot see – is in LinkedIn social listening.
  2. Mine the comments. On the three to five strongest posts, Claude reads the comments for objections, open questions and the words buyers use. Each comment carries its author, so you can see who is asking.
  3. Write the brief. One page: three themes with links to the posts behind them, the objections, the angle you can own given your product, and one recommended post.
  4. Draft the post in your voice, for you to edit. Claude does not publish at this step.
  5. Publish. After you approve the edited draft, Claude publishes it.
  6. Follow up, with evidence. A few days later Claude reads the reactions and comments on your post. A reaction or comment carries only a name, a profile link and a headline, so for each engager Claude then looks up the person's current role and company, and the company's industry and size. Only then does it match them against your target buyer. Anyone whose company or size it cannot confirm goes on the list as unknown – review, not as a match. The result, with the evidence for each match, is ready for your CRM or the routing in LinkedIn buying signals.

The prompt

Three runnable instructions for Claude Code, one per moment in the week. They are a starting point, not a record of an observed run.

Monday – research, brief and draft:

Read marketing-context.md first and follow it for product, buyer, objective and voice.

1. Search LinkedIn posts for the category phrase, latest, past week (up to 30).
2. Fetch each competitor's company page with its posts from the last 7 days.
3. Pick the 3–5 posts with the most comments that are actually about the category.
   Fetch their comments.
4. Write brief.md:
   - 3 themes, each with 1–2 links to the posts behind it
   - objections and open questions from the comments, with links
   - the angle we can own, given our product
   - one recommended post idea
5. Write draft-post.md: one post in my voice, under 1,300 characters, no links in the body.

Do not publish anything. Stop and wait for my edits.

After you edit the draft – publish:

Publish draft-post.md exactly as it is now, and give me the post URL.

Three days later – follow up:

Read marketing-context.md first.

1. Fetch the reactions and comments on <post URL>.
2. For each person, fetch their profile for current position and company, then fetch that
   company for its industry and employee count.
3. Write engagers.csv with: name, profile URL, current position, company, industry,
   employee count, what they did (reaction or comment), match (yes / no / unknown),
   and the evidence for the decision.
   - "yes" only if role, industry and size all match the target buyer.
   - "unknown" if any of them could not be confirmed – never guess.
   - Skip everyone in the exclusions.

What the brief looks like

An illustrative brief.md for the Acme Analytics scenario – the posts and people are placeholders:

markdown
# Brief – week of 12 Oct

## Themes
1. Forecast calls are spent arguing about which deals are real (posts: <link>, <link>)
2. CRM hygiene projects that never finish (post: <link>)
3. AI forecasting tools that nobody trusts (post: <link>)

## Objections and questions
- "Our reps won't update stages more often – how is this different?" (<link>)
- "What counts as stale – no activity, or no stage change?" (<link>)

## Angle we can own
Stale is a definition problem before it is a tooling problem. Show our three signals.

## Recommended post
"The three signals we use to call a deal stale – and the one we stopped using."

Run it on a schedule instead

Inside Claude Code. Claude Code routines run a saved prompt on a schedule – weekly, for example – on Anthropic's cloud, so your laptop can be closed. Create one with /schedule in the CLI or at claude.ai/code/routines. A routine can use the MCP connectors on your claude.ai account (connect the MCP server there), or skills committed to a repository it clones. Two things to know:

  • Routines are in research preview, on Pro, Max, Team and Enterprise plans.
  • They run without asking for permission, including write tools on the connectors you include. So put only the Monday research-and-draft prompt in the routine, and keep publishing as the separate instruction you run after editing.

The in-session /loop timer is not a substitute: it only fires while Claude Code is running (limitations).

With your own scheduler. If you would rather own the job, the same steps work through the REST API, the Node and Python SDKs or the shell CLI. A weekly cron script can collect the inputs, then hand them to whichever LLM writes your brief:

bash
#!/usr/bin/env bash
set -euo pipefail

linkedin post search --term "pipeline forecasting" --sort latest --date-posted pastWeek --limit 30 --json > category-posts.json

since=$(date -u -v-7d +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -d '7 days ago' +%Y-%m-%dT%H:%M:%SZ)
linkedin company fetch https://www.linkedin.com/company/example-rival --posts --posts-limit 20 --posts-since "$since" --json > example-rival-posts.json

# For each post you want to mine:
linkedin post fetch "<post-url>" --comments --comments-sort mostRecent --comments-limit 50 --json > comments.json

The engager step for your own post is the same post fetch with --reactions --comments, followed by linkedin person fetch and linkedin company fetch for each engager before you match them. For a full scheduled collection job with deduplication, see the code in LinkedIn buying signals.

Guardrails

  • A person approves every post. Claude drafts; you publish. Keep the stop in your instruction – there is no built-in approval queue.
  • Keep the sources. Themes and objections are Claude's interpretation, so the brief carries a link next to every claim.
  • A sample, not all of LinkedIn. Research covers what your account's search returns. Each post search needs a keyword, and LinkedIn widens narrow queries, so Claude should drop hits that are not about your category.
  • Pace and limits. Searches, profile views and posts count toward per-action limits by category and period, which you can see and set with the limits API. The account runs in a dedicated cloud browser at a human pace.

Automating posting itself – scheduling, the native scheduler, the posts API question – is covered in LinkedIn post automation.

Frequently Asked Questions (FAQ)

Yes, with a LinkedIn tool on your own account – Linked API's skill, MCP server or CLI – and with you approving the draft first.

No. Claude needs a tool that can search and read LinkedIn on an account, such as Linked API's skill, MCP server or CLI.

Plenty – landing pages, reporting scripts, email templates. This guide covers the LinkedIn part: research, briefs, drafts and engager follow-up.

Keep a person approving every post. The actions run on your own account in a dedicated cloud browser at a human pace, within the per-action limits you set.

No. With the skill or the MCP server, the whole workflow runs from plain-language instructions, and a Claude Code routine can run the weekly research on a schedule. Code is optional; use it when you want to own the scheduled job.

Build it in, or hand it to an agent

Build the workflow into your own tools with the REST API, the Node and Python SDKs or the CLI. Or have an AI agent run it out of the box through the MCP server, the agent-friendly CLI or a ready-made skill. Plans start at $49 a seat a month billed annually – see pricing.