How to Build an AI LinkedIn Post Generator with n8n and GPTProto API

How to Build an AI LinkedIn Post Generator with n8n and GPTProto API

A blank LinkedIn composer is a bad place to remember what your week taught you. This workflow turns project notes, customer questions, or rough bullets into a LinkedIn-ready draft. You complete a form, n8n sends the brief to a text model through the GPTProto API, and the post appears on a results page for review.

The distinction matters. GPTProto generates the copy. LinkedIn OAuth authorizes publishing. A GPTProto API key cannot replace your LinkedIn credentials.

Tabla de contenido

What Are We Building?

The beginner version contains four functional stages:

Stage n8n node What it does
Collect the brief Form Trigger Asks for the topic, audience, source notes, tone, goal, and CTA
Generate the draft HTTP Request Calls a GPT Proto text model
Extract the copy Edit Fields Pulls the generated post from the API response
Show the result Form Displays the finished draft in the browser

n8n's Form Trigger creates the input page, so you do not need to build a separate website. Its Form node can then show custom text or HTML at the end of the workflow.

The minimum workflow is:

Form Trigger → HTTP Request → Edit Fields → Form Ending

Once that works, the optional publishing version becomes:

Form Trigger → HTTP Request → Edit Fields → LinkedIn → Form Ending

Build the draft-only version first. It removes LinkedIn authentication from the initial setup and keeps a human review before publishing.

What You Need Before Starting

For the draft generator, prepare:

  • An n8n Cloud account or a self-hosted n8n instance

  • A GPT Proto account with an available balance

  • A GPT Proto API key

  • One GPT Proto text model ID

This guide uses gemini-3.5-flash-lite. A short social post does not normally require an expensive reasoning model, but you can test another GPT Proto text model by changing the model value.

Automatic publishing has additional requirements:

  • A LinkedIn account

  • A LinkedIn Company Page associated with your developer app

  • A LinkedIn developer app

  • LinkedIn OAuth credentials in n8n

According to n8n's LinkedIn credential guide, new apps use Community Management OAuth2. Organization posting also requires Community Management App Review.

Step 1: Create the LinkedIn Post Input Form

Create a new n8n workflow and add n8n Form Trigger as the first node.

Use these settings:

  • Form Title: AI LinkedIn Post Generator

  • Form Description: Turn your notes into a LinkedIn-ready draft.

  • Respond When: Workflow Finishes

  • Button Label: Generate Draft

Add the following fields. Set the internal field names exactly as shown so the expressions later in this guide work without editing.

Field label Field name Type Required?
Topic topic Text Yes
Target audience target_audience Text Yes
Source notes source_notes Textarea Yes
Tone tone Dropdown Yes
Post goal post_goal Dropdown Yes
Call to action cta Text No
Claims or phrases to avoid avoid Textarea No

Useful tone options include Practical, Personal, Contrarian, and Educational. For the post goal, use options such as Start a discussion, Share a lesson, Explain a product update, and Generate qualified interest.

Do not make the topic the only required input. “Write about AI agents” invites generic output. The source_notes field should contain the facts, examples, or opinions that make the post worth reading.

For example:

Topic: Why small teams should document API failures
Target audience: SaaS founders and engineering leads
Source notes:

- We lost two hours because a 403 response was logged as a generic request failure.

- The fix was a one-page table mapping status codes to likely causes and owners.

- The table reduced repeated Slack questions during the next release.
Tone: Practical
Post goal: Share a lesson
Call to action: Ask readers what their teams document after an incident.
Claims or phrases to avoid: Do not invent percentages or customer results.

Use the Form Trigger's Test URL during setup. Switch to the Production URL only after the workflow succeeds and is published in n8n.

Step 2: Create and Store Your GPT Proto API Key

Create a key from your GPT Proto dashboard and store it as an n8n credential. Do not place the raw key in the request body or a screenshot.

In the HTTP Request node, use a generic Header Auth credential:

  • Name: Authorization

  • Value: Bearer YOUR_GPTPROTO_API_KEY

Replace the placeholder with your real key. Keep Bearer followed by one space.

This credential authorizes model requests only. It does not give the workflow permission to publish on your LinkedIn account.

Create a GPT Proto account and API key.

Step 3: Configure the GPT Proto HTTP Request Node

Add an HTTP Request node after the Form Trigger. n8n documents this node as its general method for calling services that expose a REST API, and it supports headers and JSON request bodies. See the HTTP Request node documentation for the complete field reference.

Configure it as follows:

Setting Value
Method POST
URL https://gptproto.com/v1/chat/completions
Authentication Generic Credential Type
Generic Auth Type Header Auth
Send Headers On
Header Content-Type: application/json
Send Body On
Body Content Type JSON
Specify Body Using JSON
Response Format JSON

Paste the following into the JSON body:

{
  "model": "gemini-3.5-flash-lite",
  "messages": [
    {
      "role": "system",
      "content": "You are a careful LinkedIn editor. Turn the user's real notes into one publishable LinkedIn draft. Preserve the user's opinion and facts. Do not invent personal experience, statistics, customers, quotations, outcomes, or product capabilities. Use a specific opening, short readable paragraphs, and a natural closing question or call to action. Avoid generic hype, motivational filler, excessive emojis, and unnecessary hashtags. Return only the final post, with no explanation or label."
    },
    {
      "role": "user",
      "content": "Topic: {{$json.topic}}\nTarget audience: {{$json.target_audience}}\nSource notes: {{$json.source_notes}}\nTone: {{$json.tone}}\nPost goal: {{$json.post_goal}}\nRequested CTA: {{$json.cta}}\nClaims or phrases to avoid: {{$json.avoid}}"
    }
  ],
  "temperature": 0.7,
  "max_tokens": 900,
  "stream": false
}

The names inside {{$json...}} must match the Form Trigger's internal field names. Rename the field or update the expression if they differ.

The request follows GPT Proto's OpenAI-compatible chat structure: a model ID, a messages array, and a non-streaming response. GPT Proto's API reference shows the same /v1/chat/completions endpoint and response shape.

Test the API outside n8n

If the n8n node fails and you need to separate an API problem from a workflow problem, run this cURL request in a terminal:

curl --request POST 'https://gptproto.com/v1/chat/completions' \
  --header 'Authorization: Bearer YOUR_GPTPROTO_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini-3.5-flash-lite",
    "messages": [
      {
        "role": "user",
        "content": "Write one concise LinkedIn post about documenting API errors. Do not invent data."
      }
    ],
    "stream": false
  }'

If cURL succeeds but n8n fails, recheck the credential, JSON body, and expressions. If both fail, inspect the API key, balance, model ID, and request frequency.

Step 4: Extract the Generated LinkedIn Post

A successful chat-completions response places the generated text inside:

choices[0].message.content

Add an Edit Fields (Set) node after the HTTP Request node. Select Manual Mapping, add a String field named linkedin_post, and use this expression as its value:

{{$json.choices[0].message.content}}

Run the workflow once. A successful result should look similar to:

{
  "linkedin_post": "We lost two hours to an API error that was technically logged..."
}

Check that the draft uses only supplied facts and does not turn a modest lesson into an unsupported success story.

Step 5: Display the Draft on a Results Page

Add an n8n Form node after Edit Fields and set Page Type to Form Ending.

Under On n8n Form Submission, select Show Text. The Form node can display plain text or custom HTML on the final page. Paste this into the Text field:

<h2>Your LinkedIn draft is ready</h2>
<p>Review the facts and edit the wording before publishing.</p>
<div style="white-space: pre-wrap; padding: 16px; border: 1px solid #d0d5dd; border-radius: 8px;">
{{$json.linkedin_post}}
</div>

Submit the test form and wait for the result page. You now have a working AI LinkedIn post generator with n8n and the GPT Proto API. Test it with a personal lesson, a factual product update, and a B2B educational brief. If every result sounds alike, add more specific notes or examples of the author's voice.

Optional: Automatically Publish the Approved Draft to LinkedIn

n8n's native LinkedIn node supports the Post → Create operation. It can post as a person or organization and accepts text, article links, or media categories supported by the node.

To add publishing:

  1. Create and connect your LinkedIn credentials in n8n.

  2. Insert a LinkedIn node between Edit Fields and Form Ending.

  3. Select Post → Create.

  4. Choose Person or Organization under Post As.

  5. Map the Text field to {{$json.linkedin_post}}.

  6. Test with a private internal process before activating scheduled runs.

GPT Proto and LinkedIn use different credentials, so one step can succeed while the other fails. Organization posting can also require LinkedIn app review.

For a beginner workflow, I would stop before this node and publish manually. The extra minute of review is cheaper than deleting a confident but inaccurate post from a company page.

Turn It Into an Auto LinkedIn Post Generator for B2B Teams

Once the form version works, duplicate it before adding scheduling. Replace Form Trigger with Schedule Trigger and read approved briefs from a spreadsheet or database.

A practical B2B flow looks like this:

Schedule Trigger
→ Read one approved content brief
→ GPT Proto generates a draft
→ Save the draft for review
→ Check approval status
→ LinkedIn publishes the approved post
→ Save the LinkedIn post ID and timestamp

Keep the evidence with every brief: source URL, confirmed facts, owner, audience, and prohibited claims. Also store a unique content ID and a status such as draft, approved, published, or failed; otherwise, a retry after a partial failure can create a duplicate post.

One GPT Proto key can call different supported text models through the same endpoint. Change the model string, run the same briefs, and compare factual discipline, voice match, latency, and cost.

Common Errors and How to Fix Them

401 Unauthorized

The key is missing or invalid. Confirm that Header Auth starts with Bearer and contains no extra spaces.

403 Forbidden

Check the GPT Proto balance and model access. For a LinkedIn 403, inspect LinkedIn scopes and account permissions instead.

429 Too Many Requests

Add a wait between retries and check whether the form or schedule ran more than once.

The Workflow Runs but linkedin_post Is Empty

Confirm that the response contains choices, then verify:

{{$json.choices[0].message.content}}

An error response has no choices[0]; fix the HTTP Request first.

The Model Invents Results or Personal Experience

Add the missing facts to source_notes. Specify which claims the model may use and must not create; “make it more human” can encourage invented personal details.

The Draft Is Generated but LinkedIn Does Not Publish

Inspect LinkedIn separately: posting identity, products, organization access, and app-review status.

How Much Does One Generated LinkedIn Post Cost?

GPT Proto currently lists Gemini 3.5 Flash-Lite at $0.18 per 1 million input tokens and $1.50 per 1 million output tokens. Check the live model page before publishing a fixed estimate.

At those listed rates, a request using 1,000 input tokens and 500 output tokens costs approximately:

Input:  1,000 ÷ 1,000,000 × $0.18 = $0.00018
Output:   500 ÷ 1,000,000 × $1.50 = $0.00075
Total:                                  $0.00093

Retries or a second editing model add separate usage. Track cost per approved post, not merely cost per request.

Final Takeaway

You do not need an autonomous content machine to automate the slowest part of LinkedIn writing. A useful first version needs only a form, one GPT Proto request, one extraction field, and a results page:

Brief → GPT Proto draft → Review → Publish

Once it produces accurate drafts, add a content queue, approval states, scheduling, and the LinkedIn node. GPT Proto generates; n8n orchestrates; LinkedIn OAuth controls publishing.

Explore GPT Proto text models and build the first draft workflow with one API key.

One Key, More AI Models

Explore affordable access to leading AI models through one OpenAI-compatible API.Explore affordable access to leading AI models through one OpenAI-compatible API.

Browse API Models
One Key, More AI Models
Modelos relacionados
Todos los modelos
Google
40% OFF
DeepSeek
OpenAI
5% OFF
OpenAI
5% OFF

Frequently Asked Questions

Can n8n generate LinkedIn posts with AI?

Yes. n8n can collect a content brief, send it to an AI model through an API, extract the response, and display or store the draft. The workflow in this guide uses GPTProto as the model API and n8n as the automation layer.

Do I need an AI API to build a LinkedIn post generator in n8n?

Yes. Here, the HTTP Request node calls GPTProto; n8n moves the data but does not write the post itself.

Can I use one GPTProto API key for different models?

Yes. Keep the credential and endpoint, then change the model string. Test each replacement because style, parameters, latency, and pricing can differ.

Do I need the LinkedIn API to generate a post?

No. Generating and previewing the draft only requires n8n and the GPTProto API. You need LinkedIn OAuth when you want the workflow to publish the result directly to LinkedIn.

Can n8n post to a LinkedIn Company Page?

Yes, but n8n's documentation says organization posting requires the Advertising API product and LinkedIn Community Management App Review.

How do I stop AI LinkedIn posts from sounding generic?

Provide real notes, a specific audience, a point of view, and prohibited claims. Writing samples define voice better than labels such as “professional.”

Artículos relacionados

Más blogs
How to Build an AI Email Triage Agent for Gmail with n8n

How to Build an AI Email Triage Agent for Gmail with n8n

An overflowing inbox does not need another chatbot. It needs a reliable sorter: one that recognizes what is urgent, flags messages that need an answer, moves newsletters out of the way, and prepares a reply without sending it behind your back. This beginner guide shows how to build that AI email triage agent for Gmail in n8n. The finished workflow uses one model call per incoming email and sorts the message into one of four categories: Category Gmail action Urgent Add AI/Urgent and keep the message unread Needs Reply Add AI/Reply and create a draft response FYI Add AI/FYI Newsletter Add AI/Low Priority The model decides; n8n executes. Nothing is automatically sent, deleted, or archived in the base workflow. We will call Gemini 3.5 Flash-Lite through GPTProto's OpenAI-compatible chat-completions endpoint. It is a sensible example for a narrow classification and JSON-extraction job, where low unit cost matters more than deep reasoning. You can later change the model ID without rebuilding the Gmail side of the workflow. One Key for Your Gmail

Schuyler Stacy | 2026-09-08

Generate Multiple Images at Once in ChatGPT

Generate Multiple Images at Once in ChatGPT

TL;DR Mastering how to generate multiple images at once in chatgpt involves a combination of structured prompting in the chat UI and using specific parameters or loops via the OpenAI API. While the standard interface defaults to single outputs, you can bypass this bottleneck with grid layouts and batch commands. Most users struggle because the web interface is designed for conversational simplicity, not high-volume production. By understanding the underlying mechanics of DALL-E 3, you can start treating the tool like a creative factory rather than a simple chatbot. This guide explores the transition from manual one-off requests to automated or structured batch workflows, ensuring you never have to wait for a single image to render before starting the next creative concept.

Schuyler Stacy | 2026-08-31

Which AI Image Model Is Best for E-Commerce in 2026? 6 Models Tested on Product Photos

Which AI Image Model Is Best for E-Commerce in 2026? 6 Models Tested on Product Photos

One attractive sample tells you almost nothing about whether an AI image model is safe for e-commerce. A beautiful product photo can still contain the wrong bottle cap, a redesigned package, an invented feature, or—worse—the wrong price. We tested six image models with the same three e-commerce tasks: a nail-polish product-in-use photo, a floor lamp placed in a living room, and a wireless-earbuds ad with fixed copy. We tracked retries, product changes, physical mistakes, text accuracy, and whether the result could be published without repair. The short answer: Nano Banana Pro was the best AI image model for e-commerce overall. It was the only model that stayed near the top across all three tests. GPT Image 2 was the best for ads with exact text , while Qwen Image Plus was the lowest-cost option for bulk drafts . Midjourney produced the strongest lifestyle image, but it was the least trustworthy when the product and sales copy had to remain exact. If you only need general image-editing recommendations, see our separate guide to the best image-editing AI models . This comparison focuses specifically on e-commerce production and the cost of getting an image that is actually ready to publish. Try Nano Banana Pro Now

2026-08-27

AI API 429 Error: How to Handle Rate Limits

AI API 429 Error: How to Handle Rate Limits

TL;DR The AI API 429 error is a traffic cop, not a bug. You can beat the bottleneck by parsing server headers, implementing jittered backoff, or using multi-model gateways to ensure your app never stops. When your code hits the rate limit wall, guessing the wait time is a recipe for failure. Real engineering requires respecting the provider's limits while maintaining high uptime through smart failovers and precise scheduling. Most developers treat these errors as a nuisance to be ignored, but they are actually a signal to upgrade your infrastructure. Moving from a single-model dependency to a resilient, multi-provider system is the only way to scale without constant downtime.

Tiffany Layne | 2026-08-26