{"id":558,"date":"2025-05-24T15:31:25","date_gmt":"2025-05-24T13:31:25","guid":{"rendered":"https:\/\/it4home.dk\/?p=558"},"modified":"2025-05-29T11:37:56","modified_gmt":"2025-05-29T09:37:56","slug":"ai-agents-with-n8n","status":"publish","type":"post","link":"https:\/\/it4home.dk\/index.php\/2025\/05\/24\/ai-agents-with-n8n\/","title":{"rendered":"AI Agents with n8n"},"content":{"rendered":"<div class=\"pdfprnt-buttons pdfprnt-buttons-post pdfprnt-top-right\"><a href=\"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/posts\/558?print=pdf\" class=\"pdfprnt-button pdfprnt-button-pdf\" target=\"_blank\" ><\/a><a href=\"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/posts\/558?print=print\" class=\"pdfprnt-button pdfprnt-button-print\" target=\"_blank\" ><img decoding=\"async\" src=\"https:\/\/it4home.dk\/wp-content\/plugins\/pdf-print\/images\/print.png\" alt=\"image_print\" title=\"Print Content\" \/><\/a><\/div>\n<p>Want to automate tasks in your homelab or explore what AI agents can do? <strong>n8n<\/strong> is a free, open-source automation tool that runs perfectly on a Raspberry Pi 5. With it, you can build smart workflows that connect APIs, trigger actions, and even control AI agents like ChatGPT.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"921\" height=\"474\" src=\"https:\/\/it4home.dk\/wp-content\/uploads\/2025\/05\/billede-2.png\" alt=\"\" class=\"wp-image-568\" srcset=\"https:\/\/it4home.dk\/wp-content\/uploads\/2025\/05\/billede-2.png 921w, https:\/\/it4home.dk\/wp-content\/uploads\/2025\/05\/billede-2-300x154.png 300w, https:\/\/it4home.dk\/wp-content\/uploads\/2025\/05\/billede-2-768x395.png 768w\" sizes=\"auto, (max-width: 921px) 100vw, 921px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">What You Can Do with n8n<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Trigger AI responses with webhooks<\/li>\n\n\n\n<li>Connect apps like Gmail, Telegram, or Google Sheets<\/li>\n\n\n\n<li>Automate reports, alerts, backups, and file processing<\/li>\n\n\n\n<li>Build AI workflows that take action on your data<\/li>\n<\/ul>\n\n\n\n<p>No coding is required, but you can use JavaScript and expressions if you want more control.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Install n8n on Raspberry Pi 5 (with Docker)<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1. Install Docker<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo curl -fsSL https:\/\/get.docker.com -o get-docker.sh \nsudo sh get-docker.sh\nsudo reboot\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2. Add User to Docker Group<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo groupadd docker &amp;&amp; sudo usermod -aG docker $USER\nsudo reboot\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3. (Optional) Install Portainer for GUI Management<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -d -p 9000:9000 --name=portainer --restart=always --pull=always \\\n  -v \/var\/run\/docker.sock:\/var\/run\/docker.sock \\\n  -v \/data\/portainer_data:\/data \\\n  portainer\/portainer-ee:latest\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">4. Prepare Data Folders<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mkdir -p \/data\/n8n_data \/data\/compose\/n8n\nsudo chmod -R 777 \/data\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">5. Create <code>docker-compose.yml<\/code><\/h4>\n\n\n\n<p>Save this in <code>\/data\/compose\/n8n\/docker-compose.yml<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>services:\n  n8n:\n    image: n8nio\/n8n:latest\n    restart: always\n    ports:\n      - \"5678:5678\"\n    environment:\n      - TZ=Europe\/Copenhagen\n      - N8N_BASIC_AUTH_ACTIVE=true\n      - N8N_BASIC_AUTH_USER=admin\n      - N8N_BASIC_AUTH_PASSWORD=xxxxxxxxxxxx\n      - N8N_HOST=10.168.0.277\n      - N8N_PORT=5678\n      - N8N_SECURE_COOKIE=false\n    volumes:\n      - \/data\/n8n_data:\/home\/node\/.n8n\n<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u26a0\ufe0f Replace the IP address with your Raspberry Pi\u2019s actual IP.<\/p>\n<\/blockquote>\n\n\n\n<h4 class=\"wp-block-heading\">6. Launch n8n<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/data\/compose\/n8n\ndocker compose up -d\n<\/code><\/pre>\n\n\n\n<p>Now open your browser:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:&#47;&#47;10.168.0.277:5678\n\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"891\" height=\"584\" src=\"https:\/\/it4home.dk\/wp-content\/uploads\/2025\/05\/billede-1.png\" alt=\"\" class=\"wp-image-565\" srcset=\"https:\/\/it4home.dk\/wp-content\/uploads\/2025\/05\/billede-1.png 891w, https:\/\/it4home.dk\/wp-content\/uploads\/2025\/05\/billede-1-300x197.png 300w, https:\/\/it4home.dk\/wp-content\/uploads\/2025\/05\/billede-1-768x503.png 768w\" sizes=\"auto, (max-width: 891px) 100vw, 891px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>n8n + AI agents = powerful automation.<\/strong> Run it in your homelab and take full control of your workflows.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Want to automate tasks in your homelab or explore what AI agents can do? n8n is a free, open-source automation tool that runs perfectly on a Raspberry Pi 5. With it, you can build&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":562,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[36,2,7],"tags":[],"class_list":["post-558","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-docker","category-raspberry"],"_links":{"self":[{"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/posts\/558","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/comments?post=558"}],"version-history":[{"count":4,"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/posts\/558\/revisions"}],"predecessor-version":[{"id":569,"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/posts\/558\/revisions\/569"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/media\/562"}],"wp:attachment":[{"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/media?parent=558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/categories?post=558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/tags?post=558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}