Automating posts in Postmypost with n8n
What is n8n?
n8n is a workflow automation platform that allows you to connect different services and applications without writing code. It allows you to set up automated workflows, where one action triggers another—for example, receiving data, processing it, and sending it to another service.
n8n is often used as a "link" between systems: CRM, messaging apps, analytics, content publishing services, and APIs from various platforms.
How does n8n work?
N8n is built on a node-based architecture. Each node is responsible for a single action: receiving data, sending a request, filtering information, or fulfilling a condition. Nodes are connected to each other in a logical chain, forming an automation scenario.
A scenario can be triggered manually, on a schedule, or by an event—for example, upon receiving a new message, creating a post, or receiving a webhook. Once launched, n8n sequentially executes all steps and transfers data from one node to another.
What is n8n used for?
n8n is used to automate routine processes and integrate services that are not directly connected. This helps reduce manual work, reduce errors, and speed up task completion.
The platform is used for automated content publishing, data synchronization between systems, lead processing, notification processing, analytics collection, and API interaction. Thanks to its flexible configuration, n8n is suitable for both simple tasks and complex multi-step processes.
Publishing posts from n8n to social media via Postmypost
This is an example of setting up a workflow in n8n that demonstrates how to automatically generate content using a neural network and transfer it to Postmypost. The instructions demonstrate working with a scheduler, an AI agent, the OpenAI API, and sending posts to the Postmypost project for subsequent editing and publishing.
Step 1. Getting started
- Go to the n8n website.
- Create a new workflow.
https://n8n.io/

Step 2. Setting up a schedule
- Enable Schedule Trigger.
https://n8n.io/

- Set the frequency (e.g., "Daily at 10:00").
https://n8n.io/

Step 3. Adding a neural network
- Select AI in the menu.
https://n8n.io/

- Then select AI Agent.
https://n8n.io/

- In the Source for Prompt field, set the value to Define below to create a custom prompt.
https://n8n.io/

- Formulate a query for the neural network.
https://n8n.io/

- Connect the chat model.
https://n8n.io/

- Determine the appropriate neural network model.
https://n8n.io/

Step 4. Configuring the neural network
- Select the accounts to connect to.
https://n8n.io/

- Enter the OpenAI API key.
https://n8n.io/

- Activate the workflow to test the neural network's response.
Step 5. Connecting Postmypost
- Add the HTTP Request component (HTTPS request).
https://n8n.io/

- Select the method: POST.
https://n8n.io/

- Enter the URL: https://api.postmypost.io/v4/publications
https://n8n.io/

- Generate the header: Authorization: Bearer your_token
https://n8n.io/

Step 6. Publishing parameters
- Fill the request body with the required publishing parameters. A detailed description of all parameters is available in the API documentation. You must specify the project ID, scheduled publishing time, list of account IDs, status, and other publishing parameters.
https://n8n.io/

- For the content parameter, use the neural network output to automatically publish the generated content. This is done by dragging the "output" icon to the desired parameter (important: the parameter must be enclosed in quotation marks).
https://n8n.io/

Everything is ready! Activate and run the workflow. If configured correctly, the publication with status 4 will be added to the "Drafts" section of your project. You will be able to view, edit, and publish the material.
Answers to questions
How do I get an API token in Postmypost?
- Open the "Access Tokens" section.
https://app.postmypost.io/

- Click the "Create" button.
https://app.postmypost.io/

- Specify a name for the token.
https://app.postmypost.io/

- Save the generated token.
https://app.postmypost.io/
