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:
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:
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:
Create and connect your LinkedIn credentials in n8n.
Insert a LinkedIn node between Edit Fields and Form Ending.
Select Post → Create.
Choose Person or Organization under Post As.
Map the Text field to {{$json.linkedin_post}}.
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.