n8n template: draft a post from a topic with AI
With this template you only enter a topic, and OpenAI writes a post text in your brand style. Social Poster saves it as a draft that you review in peace. Once you trust the texts, you switch one field so valid drafts are scheduled right away.
Download: ai-topic-to-draft-for-review.json from the help center or from GitHub. How to import the file is explained in n8n templates.

What the template does
- Enter a topic is an n8n form with the fields Topic (required) and Notes.
- Settings holds your account reference, the mode and the lead time, and passes topic and notes on.
- Get brand context loads your team's brand profile and the network rules from Social Poster.
- Write the post text sends context, topic and notes to OpenAI. The default model is gpt-4o-mini. The AI only writes the text.
- Create the draft saves the text as a draft and marks it as AI-generated. Validate the draft checks it against the rules of the chosen network.
- Should it be scheduled? only passes the draft on when mode is schedule and Validate the draft reports it as valid. Then Schedule the draft schedules it minutesFromNow minutes later and confirms it.
With mode draft, the default, the template schedules nothing and publishes nothing.
Where you see the draft
The output of Create the draft shows the draft ID (draft_ref, starts with dr_) and the link app_draft_url under draft. After you sign in to Social Poster, the link opens a read-only view of the draft. A post only appears in the calendar once it is scheduled.
In the app: If the new view is already switched on for your team, you also find the draft under Drafts in the section Drafts from n8n and AI assistants. It carries the label Automation (n8n). With the Source filter you show only these drafts. There you can edit the text, schedule the draft or delete it. Scheduling follows the same rules as in n8n: consents, approval, quota and at least 5 minutes lead time. The calendar shows scheduled posts with the same label, and you can filter by Source there too. If you don't see the section yet, the view isn't switched on for your team yet. Then use the link app_draft_url as before.
What you adapt
In the node Settings:
- accountRef: Your account reference instead of acc_YOUR_ACCOUNT_REF. How to find it is explained in n8n templates.
- mode: The default is draft. With schedule, valid drafts are scheduled.
- minutesFromNow: Only used with mode schedule. How many minutes after the form is sent the post goes out. The default is 15; the node treats values below 5 as 5.
- Topic and Notes come from the form. You don't need to change anything here.
In the node Write the post text:
- Model: The default is gpt-4o-mini. You can choose another OpenAI model.
- Prompt: The text under Messages defines how the AI writes. The defaults are: language of the topic, under 1,800 characters, no invented facts, no lists of hashtags unless the notes ask for them. You change these rules directly in the prompt, for example for a more formal tone, a different length or fixed hashtags.
In the node Enter a topic you can change the title, description and fields of the form.
Credentials: select Social Poster API in Get brand context, Create the draft, Validate the draft and Schedule the draft, and your OpenAI credential in Write the post text.
For good brand context, create a brand profile in Social Poster. The AI then uses the details from your profile.
Switch from draft to scheduled
AI texts can contain mistakes. Only switch once you have read a few drafts and are happy with the texts.
- Open the node Settings.
- Change the value of the field mode from draft to schedule. Upper or lower case and spaces at the edges don't matter. Any other value keeps the draft.
- Enter in minutesFromNow how many minutes after sending the form the post should go out. A longer lead time, for example 120, gives you time to check the post in the calendar before it goes out.
- Open Schedule the draft and check that your Social Poster API credential is selected.
- Click Test workflow and submit a topic in the form.
- The output of Schedule the draft now shows scheduled_at_utc (the time in UTC) and status_class. Check the post in Social Poster in the calendar or under Wartet auf dich (waiting for you).
- Save the workflow and activate it.
To go back to drafts, set mode to draft.
Typical variations
- A schedule instead of the form: Replace Enter a topic with a Schedule Trigger and enter the topic as a fixed value in Settings.
- Topics from a sheet: Read the topics with a Google Sheets node and let the template create one draft per row.
- Add an image: In the node Create the draft, add the field Media URLs under Additional Fields with a publicly reachable image address.
- Schedule a single draft later: Add a Social Poster node with Post > Schedule Draft, enter the draft ID under Draft ID and run it once.
Errors and solutions
- The draft has no text: The OpenAI answer arrived in a different format. Look at the output of Write the post text and adapt the expression in the Text field of Create the draft.
- Validate the draft reports ok: false: The draft still exists. Under errors you see what the network does not accept, for example a text that is too long. Even with mode schedule this draft is not scheduled.
- Nothing is scheduled: mode is set to draft or misspelled, or the draft was not valid.
- “This account cannot be used.”: The account reference is wrong or the account is not ticked on KI-Zugriffe (AI access).
- OpenAI reports an error: Check your OpenAI credential and your balance with OpenAI.
- The text does not sound like you: Complete your brand profile in Social Poster or write more precise notes in the form.
- For X: Leave X Content Reviewed off in Schedule the draft until a person has checked the exact text.