Introduction: The “Aha!” Moment β¨ #
This is the moment. Everything we have built so farβthe hardware foundation, the software command center, the models, the APIβall comes together right now. In this guide, you will build your very first, end-to-end automation that uses your private, local AI as its brain. You will move from simply chatting with an AI to making it an active participant in a workflow. This is the “Aha!” moment where you will truly feel the power and freedom of a sovereign AI system. Let’s begin.
Why n8n? The Power of “Source-Available” #
For this project, we will use an automation platform called n8n (pronounced “n-eight-n”). While other tools like Zapier are excellent, we are choosing n8n for a reason that aligns perfectly with our pillar’s philosophy: it is “source-available” and can be easily run on your own machine (via Docker). This means you can create a workflow where the automation tool and the AI are both running locally, giving you an unmatched level of privacy and control.
Our Project: A Simple “AI Tagging” Workflow #
We will build a simple but highly useful workflow. We will give it a piece of text, and our local AI model will automatically read it and assign relevant tags, which we could then use to categorize documents, emails, or notes.
[Video Walkthrough Placeholder] π¬ A full, detailed video walkthrough of this entire n8n workflow, from setting up the nodes to testing the final output, will be embedded here.
The Step-by-Step Guide #
This guide assumes you have a working Ollama setup with a model downloaded (we recommend llama3) and that you have n8n installed and running.
Step 1: Set Up Your n8n Workflow #
In your n8n canvas, click the + button to add your first node. Search for and select the Manual trigger. This is the simplest trigger, allowing us to start the workflow with a single click for testing purposes.
Step 2: The “HTTP Request” Node (Calling Your AI) #
This is the critical step. We need to “call” our local AI’s API.
- Click the + after the Manual node and add an HTTP Request node.
- Configure the following settings in the node’s properties panel:
- Method: POST
- URL: http://localhost:11434/api/chat (This is the standard “phone number” for Ollama’s API).
- Body Content Type: JSON
- JSON/RAW Parameters: This is where we will write the “message” to our AI. Click “Add Expression” and paste the following JSON code:
<!– end list –>
{
“model”: “llama3”,
“stream”: false,
“messages”: [
{
“role”: “system”,
“content”: “You are an expert at analyzing text. Your task is to provide a comma-separated list of 3-5 relevant keyword tags for the given text. Provide ONLY the comma-separated list and nothing else.”
},
{
“role”: “user”,
“content”: “Here is the text to analyze: StarphiX is building a Knowledge Center to teach users about Local AI, which offers benefits like privacy, control, and no ongoing costs.”
}
]
}
This JSON object tells your local AI exactly what model to use (llama3), what its “job” is (the system message), and what text to analyze (the user message).
Step 3: Test the Workflow #
At the bottom of your n8n canvas, click the “Test workflow” button. The workflow will run, the HTTP Request node will call your local Ollama API, and your GPU will spin up to process the request. After a few seconds, you should see a successful run. Click on the HTTP Request node to view the output, where you’ll find the AI-generated response containing your tags (e.g., Local AI,Knowledge Center,Privacy,Control,Cost).
Step 4: You’ve Built a Sovereign Automation! #
Congratulations! You have just successfully built a complete, end-to-end automation that runs entirely on your own machine. Your data was processed by your AI on your hardware, with zero data sent to the cloud. This is the very definition of a sovereign workflow and the essence of the practical, powerful systems we champion at StarphiX. From here, you can connect the output of your AI to any other applicationβa Google Sheet, a Trello card, a databaseβto build workflows that are limited only by your imagination.
Related Reading π #
- What’s Next?: Practical Project: Building a Private ‘Meeting Matrix Summarizer’ π
- Go Back: The Power of APIs: Connecting Local AI to Other Tools π
Explore the Tool:The Directory of Tools & Frameworks – n8n π§°