Post to LinkedIn from Grok Bot

Pin the organization id. An unset one means the personal profile, which stays off until you explicitly share it, so an unattended run fails closed rather than posting as you.

Hermoso is a marketing MCP server: 906+ tools over one OAuth’d endpoint that let an agent research the ads already running in a market, generate finished image and video ads, publish them, and build the paid campaigns behind them. Grok Bot reaches all of it through one connection. This page covers one slice of that: what Grok Bot can actually do on LinkedIn, and what LinkedIn will not let it do.

Connect Hermoso to Grok Bot

  1. Fastest: add the Hermoso Marketing Bot template. Open the template and add it to Grok Bot. It arrives wired to Hermoso but with no key, because templates never carry secrets, so it asks for one: create a key under MCP & CLI → Terminal & API keys and paste it into the Bot’s chat. A key carries real spend authority, so treat it like a password.
  2. Or sign in from the Bot’s own terminal. Every Bot gets a browser, a filesystem and a shell, so the keyless install works there too:
    npm install -g hermoso && hermoso auth login
    The hermoso command is then available to the Bot with nothing pasted into a config file. Settings → Plugins is a catalog of pre-built connectors that does not list Hermoso, so the template and the terminal are the ways in today.
  3. Using Grok Build instead? xAI’s terminal coding agent is a separate product with its own setup: see Hermoso in Grok Build.
  4. Ask a Bot for something. “Pull my three closest competitors’ longest-running ads and remix the best hook into a 9:16 video,” or “post this render to the channel.” The agent picks the tools; you approve the spend.

Hermoso is not affiliated with or endorsed by xAI and does not claim to be. The Hermoso Marketing Bot template is published by Hermoso; the same steps are in the app under MCP & CLI, on the Grok Bot tab of the agent setup.

Then connect LinkedIn itself, once, under Settings → Connectors in Hermoso. That is an OAuth consent screen, so it is the one step that needs a browser. Everything after it is a tool call.

The LinkedIn tools Grok Bot gets

  • post_to_linkedin_page: publishes text, an image, a video or a multi-image post to a company Page, with alt text.
  • post_to_linkedin: publishes to a personal profile, which stays switched off until you explicitly share that identity.
  • list_linkedin_pages: the Pages you have shared with this brand, with their organization ids.
  • schedule_post: queues it, carrying linkedinOrganizationId so the right identity posts.
  • manage_linkedin_post: edit the copy of a post, or delete it.
  • linkedin_page_analytics: organic Page performance: follower gains, Page views, and post impressions, clicks and engagement, per Page or per post.
  • search_linkedin_ads: the LinkedIn Ad Library, the one public ad library that exposes real impression counts.

LinkedIn is the channel where identity is a permission rather than a preference. One person usually administers several companies’ Pages, so Hermoso makes the postable identities an explicit choice: only the Pages you have ticked under Manage accounts can be posted to, an unticked Page is refused server-side rather than in the UI alone, and the personal profile is off unless you turn it on. An agent that asks which Page rather than assuming is doing the right thing.

LinkedIn limits worth knowing before you automate anything

TextA LinkedIn post is capped at 3,000 characters. It is enforced when the post is created or queued, so an overlong post is refused while you are still there to fix it instead of being silently cut on the way out.
VisibilityPublic only. A LinkedIn post publishes to the profile or the company Page, and “LinkedIn has no unlisted, private or draft post.”
Carousel2 to 20 images, from a company Page. Both bounds are LinkedIn’s own: “A MultiImage post is a post containing multiple images (minimum of 2 images and maximum of 20 images)”, and the schema adds “Only supports images”. Two refusals follow from that and both are by name rather than by silent downgrade: a video slide is refused because LinkedIn’s multi-image post cannot carry one, and a personal-profile carousel is refused with the way forward: pass linkedinOrganizationId (from list_linkedin_pages), because “a personal-profile carousel is not something Hermoso can publish.”
Which accountlinkedinOrganizationId. Unset means the member’s own profile, never “probably the company”. The field is how you say which Page, and leaving it out is a decision rather than an accident.

Try it in Grok Bot

Ask for it in ordinary language. These are plain sentences, not a DSL:

“Every Thursday, turn the week's shipped work into a company Page post with a carousel of the three best screenshots and alt text on each.”

That walks list_linkedin_pages → plan_ad → render_ad → post_to_linkedin_page → linkedin_page_analytics. Approval is Grok Bot’s setting rather than ours, and the shared machine is the reason to think about it: isolation is per user, not per Bot, so anything one Bot connects, every Bot on that machine can reach.

Grok Bot on LinkedIn: the part that bites

Resolve the Page once with list_linkedin_pages and store the id in the job. The identity rules are enforced on the server rather than in a UI, so a Bot genuinely cannot post to a Page you have not shared. That is the right default for something running on its own, but finding it out at 9am on a Thursday is avoidable, and a carousel needs the Page id regardless because multi-image posts come from company Pages.

For a long unattended run the hermoso CLI is the cheaper path: the agent shells out per command instead of carrying an 906+ tool manifest through every turn of a job that might run for days.

Research LinkedIn before you post

search_linkedin_ads reads the LinkedIn Ad Library, which is unusual among public ad libraries in exposing real impression counts, so B2B competitor research on LinkedIn can be ranked by actual delivery rather than by guesswork about what is running.

The paid half

create_linkedin_ads_campaign_group → create_linkedin_ads_campaign → create_linkedin_ads_creative builds the tree, and everything is born as a draft. set_linkedin_ads_status is the only switch that arms real money and it refuses without an explicit confirmation. One access note that is better said than discovered: LinkedIn meters ad writes by the API tier your own ad account holds. Reporting and reads are unrestricted, and on the development tier an app may edit a small number of ad accounts, each registered by hand.

What Grok Bot cannot do on its own

An agent with a budget is only useful if the blast radius is bounded, so the fence is in the server rather than in a prompt. Every ad campaign, ad set, ad group and ad is created paused, and the status switches that arm real money refuse to run without an explicit confirmation flag. Every render is quoted first (hermoso_capabilities publishes each model’s exact credit cost before anything spends). Credits are reserved before the first provider call and settled at the exact cost afterwards, so a failed dispatch refunds rather than leaving you billed for nothing. Deletes are confirm-gated too, and every campaign tree is read back from the ad platform before your agent tells you what it built.

One step is deliberately not headless: linking an account is an OAuth consent screen, so you connect the channel once in a browser. Everything after that is a tool call.

The rest of the matrix

From Grok Bot, post to: Facebook · Instagram · Threads · TikTok · YouTube · X · Pinterest · Bluesky · Telegram. Or see everything Grok Bot can publish to.

Post to LinkedIn from: Claude · ChatGPT · Claude Code · Cursor · Codex · Cline · OpenClaw · Hermes · Gemini CLI · Perplexity · Le Chat · Claude Cowork · Perplexity Computer · Paperclip

Frequently asked questions

Can Grok Bot post to LinkedIn?

Yes, through Hermoso's MCP server. Add the Hermoso Marketing Bot template from x.ai/bot/THQqogUKuhn1whWU0hrmb, which arrives wired to Hermoso and asks for an API key you create under MCP & CLI, Terminal & API keys. Or run npm install -g hermoso && hermoso auth login in the Bot's own terminal, which stores the credential with nothing pasted. Grok Bot then has 906+ tools, including the ones that publish to LinkedIn, plus the ones that research the ads already running in your market and render the creative in the first place.

How do I connect LinkedIn to Grok Bot?

Two steps, once each. Add the Hermoso Marketing Bot template from x.ai/bot/THQqogUKuhn1whWU0hrmb, which arrives wired to Hermoso and asks for an API key you create under MCP & CLI, Terminal & API keys. Or run npm install -g hermoso && hermoso auth login in the Bot's own terminal, which stores the credential with nothing pasted. Then connect LinkedIn inside Hermoso under Settings → Connectors, which is an OAuth consent screen in a browser. After that Grok Bot publishes to LinkedIn as an ordinary tool call.

Can Grok Bot post a carousel to LinkedIn?

Yes: 2 to 20 images, from a company Page, images only. Those are LinkedIn’s own published bounds; a personal-profile carousel is refused by name with the fix attached rather than posting slide one. Grok Bot calls the same publish tool either way, and a channel that cannot carry a carousel is refused with the real reason attached.

Can Grok Bot research LinkedIn before it posts?

Yes, and unusually well: search_linkedin_ads reads the LinkedIn Ad Library, which is the one public ad library that exposes real impression counts.

Does Grok Bot need my LinkedIn password?

No. You connect LinkedIn to Hermoso once through an OAuth consent screen in a browser, and Grok Bot then reaches it as a tool call. Linking an account is the one step that is not headless; nothing after it needs a password, and no credential is ever handed to the model.

Can Grok Bot run LinkedIn ads as well as posting?

Yes. The LinkedIn Ads tree is buildable (campaign group, campaign, creative), and everything is born as a draft, with the status switch confirm-gated. LinkedIn meters ad writes by the API tier your own ad account holds.

Related

The long version, with the setup and what it did in practice: run your marketing with a Grok bot and autonomous marketing with a Grok bot.

The same bot on other channels: X, Instagram, TikTok, YouTube, Facebook, Threads and Pinterest.

Start free with 30 credits at signup and 250+ more to earn. Every feature is on every plan. Credits are spent only on AI models and Ad Spy research; posting, scheduling, ads management and analytics are free.

Start free →   See pricing