Générateur de haïkus matinal piloté par l'IA (Google Docs + Gmail)

Intermédiaire

Ceci est unContent Creation, Multimodal AIworkflow d'automatisation du domainecontenant 14 nœuds.Utilise principalement des nœuds comme Set, Code, Gmail, GoogleDocs, Agent. Génération quotidienne de haïkus du matin avec OpenRouter AI, Google Docs et Gmail

Prérequis
  • Compte Google et informations d'identification Gmail API
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "sSq3OBOGly6oGT5M",
  "meta": {
    "instanceId": "15d6057a37b8367f33882dd60593ee5f6cc0c59310ff1dc66b626d726083b48d"
  },
  "name": "AI-Powered Morning Haiku Generator (Google Docs + Gmail)",
  "tags": [],
  "nodes": [
    {
      "id": "c2c25ff3-8044-40c1-9a0f-08e469f42250",
      "name": "Déclencheur planifié",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        16,
        144
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 7
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b86d8fbd-7154-43f0-a722-e22ca8ac170a",
      "name": "Code en JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        592,
        144
      ],
      "parameters": {
        "jsCode": "// 前のAI Agentノードから出力を受け取ります。\n// データは 'output' フィールドに入っています。\nlet aiResponse = $node[\"AI Agent\"].json.output;\n\n// AIの応答に```json ... ```のような余分な文字が含まれている場合、\n// 中身のJSON部分だけを抽出します。\nif (aiResponse.includes('```')) {\n  aiResponse = aiResponse.substring(aiResponse.indexOf('{'), aiResponse.lastIndexOf('}') + 1);\n}\n\n// JSON文字列をオブジェクトに変換します。\nconst words = JSON.parse(aiResponse);\n\n// AIが生成した単語を使って、5-7-5調の俳句を組み立てます。\nconst line1 = `${words.kigo}の中`;\nconst line2 = `${words.noun}で心が${words.verb1}`;\nconst line3 = `今日もまた${words.verb2}`;\n\nconst haiku = `${line1}\\n${line2}\\n${line3}`;\n\n// タイトルを生成し、haikuと一緒に後続のノードへ渡します。\nconst title = `今日の一句 (${new Date().toLocaleDateString('ja-JP')})`; // ← ここのタイプミスを修正\n\nreturn [{\n  json: {\n    haiku,\n    title\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "8da62bb5-391d-40ad-a9e3-e8a50f3d2983",
      "name": "Modifier les champs",
      "type": "n8n-nodes-base.set",
      "position": [
        816,
        144
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "774b47ef-875a-4f9f-9530-51ae0720ae44",
              "name": "documentTitle",
              "type": "string",
              "value": "={{ $json.title }}"
            },
            {
              "id": "66d74b89-e9f5-4982-ae66-e5fb18b10993",
              "name": "documentBody",
              "type": "string",
              "value": "={{ \"# \" + $json.title + \"\\n\\n\" + $json.haiku + \"\\n\\n$2014 n8n Haiku Generator\" }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "f21266fa-3226-443f-a84d-a958497a5948",
      "name": "Créer un document",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        1040,
        144
      ],
      "parameters": {
        "title": "={{ $node[\"Edit Fields\"].json.documentTitle ?? '今日の一句' }}\n",
        "folderId": "1W45ugKiRbbwp3FIFdLL690DAgkVKCKWB"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "id": "8gSL1GR6UbWI85jx",
          "name": "roumut.shukuwa@gmail.com"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "d9b2fbbb-341f-4d20-b493-c48e7c1e56d7",
      "name": "Envoyer un message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1712,
        144
      ],
      "webhookId": "2c597a75-2510-43b9-ba30-a50565f7784f",
      "parameters": {
        "sendTo": "syukuwa@joseikincenter.com",
        "message": "={{ $node[\"Code in JavaScript\"].json.haiku + \"\\n\\n$2014 本日の俳句をお届けします $2600$FE0F\" }}",
        "options": {},
        "subject": "={{ $node[\"Edit Fields\"].json.documentTitle }}",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "cj3AlN01rxKBC3Tg",
          "name": "roumut.shukuwa@gmail.com"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "745a8e10-7393-42e1-8d01-3808d5c0553a",
      "name": "Préparer l'ajout",
      "type": "n8n-nodes-base.set",
      "position": [
        1264,
        144
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "e4fc8729-a49f-42b4-a626-8e15ed84d7fc",
              "name": "docId",
              "type": "string",
              "value": "={{ $node[\"Create a document\"].json.id }}"
            },
            {
              "id": "469d4459-0ec7-4cbd-8bd7-f32853d7e3a8",
              "name": "text",
              "type": "string",
              "value": "={{ $node[\"Edit Fields\"].json.documentBody }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "5f7c8ef7-bd1a-4987-a976-69924d084c33",
      "name": "Mettre à jour un document",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        1488,
        144
      ],
      "parameters": {
        "actionsUi": {
          "actionFields": [
            {
              "text": "={{ $node[\"Prepare Append\"].json.text }}",
              "action": "insert"
            }
          ]
        },
        "operation": "update",
        "documentURL": "={{ $node[\"Prepare Append\"].json.docId }}"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "id": "8gSL1GR6UbWI85jx",
          "name": "roumut.shukuwa@gmail.com"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "c0b48c24-42be-45ca-959d-ef0d439b38cd",
      "name": "Agent IA",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        240,
        144
      ],
      "parameters": {
        "text": "あなたは創造的な俳人です。\n俳句を生成するための部品となる単語を4つ、JSON形式で提案してください。\n\n- kigo: 現在の季節に合った美しい季語を1つ\n- noun: 情景が浮かぶような名詞を1つ\n- verb1: 動作や状態を表す動詞を1つ\n- verb2: 1つ目の動詞とは異なる、余韻を残すような動詞をもう1つ\n\n説明や余計なテキストは一切含めず、必ず以下のJSON形式のフォーマットで、キーも英語で出力してください:\n{\n  \"kigo\": \"ここに季語\",\n  \"noun\": \"ここに名詞\",\n  \"verb1\": \"ここに動詞1\",\n  \"verb2\": \"ここに動詞2\"\n}",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "a39e75bc-a06d-4dfd-a521-579a5bd34838",
      "name": "Modèle de chat OpenRouter",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        312,
        368
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "id": "fMR5QJezr3tD108w",
          "name": "簡易デモ"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b3378d42-0e19-4103-ad86-b0f67399a29d",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -432,
        -384
      ],
      "parameters": {
        "width": 400,
        "height": 512,
        "content": "## Overview: AI-Powered Morning Haiku Generator\n\n## How it works\nThis workflow automatically creates and emails a morning haiku every day at 7:00 AM.\nIt uses OpenRouter AI to generate four creative words $2014 a seasonal word, a noun, and two verbs $2014 then builds a 5-7-5 haiku. The haiku is saved to Google Docs and delivered via Gmail as a daily poem.\n\n## Setup steps\nConnect your OpenRouter, Google Docs, and Gmail credentials.\nAdjust the schedule in the “Schedule Trigger” node (default: 07:00 AM).\nUpdate the email recipient in the “Send a message” node.\nOptionally change the Google Docs folder ID in “Create a document.”"
      },
      "typeVersion": 1
    },
    {
      "id": "a50e624c-29f3-4e4e-bed8-ac023a2b5e4b",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -112
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": "### Section 1 $2014 Scheduling & AI Generation\n\n$D83D$DCC5 Schedule Trigger → AI Agent → OpenRouter Model\n\n\nGenerates haiku components \ndaily at 07:00 AM using OpenRouter AI. ($2248 40 words)"
      },
      "typeVersion": 1
    },
    {
      "id": "bf77288f-0b71-4552-898d-f21994175afd",
      "name": "Note adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        -112
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": "### Section 2 $2014 Build and Format Haiku\n\n$D83D$DCBB Code in JavaScript → Edit Fields\n\nCombines AI outputs into a 5-7-5 haiku and sets the title and body text. ($2248 40 words)"
      },
      "typeVersion": 1
    },
    {
      "id": "f45248f1-6075-4fd4-a782-403a2f55c323",
      "name": "Note adhésive3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        -112
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": "### Section 3 $2014 Google Docs Automation\n\n$D83D$DCC4 Create Document → Prepare Append → Update Document\n\nCreates a Google Doc for today’s haiku and appends the new text daily. ($2248 35 words)"
      },
      "typeVersion": 1
    },
    {
      "id": "79cf9fc1-7420-4e28-a6df-9b6ff0de685e",
      "name": "Note adhésive4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        -112
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": "### Section 4 $2014 Email Delivery\n\n$2709$FE0F Send a message (Gmail)\n\nSends the final haiku via email each morning with a warm greeting. ($2248 25 words)"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c8750437-c566-4ffc-aad7-874169a5d914",
  "connections": {
    "c0b48c24-42be-45ca-959d-ef0d439b38cd": {
      "main": [
        [
          {
            "node": "b86d8fbd-7154-43f0-a722-e22ca8ac170a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8da62bb5-391d-40ad-a9e3-e8a50f3d2983": {
      "main": [
        [
          {
            "node": "f21266fa-3226-443f-a84d-a958497a5948",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "745a8e10-7393-42e1-8d01-3808d5c0553a": {
      "main": [
        [
          {
            "node": "5f7c8ef7-bd1a-4987-a976-69924d084c33",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c2c25ff3-8044-40c1-9a0f-08e469f42250": {
      "main": [
        [
          {
            "node": "c0b48c24-42be-45ca-959d-ef0d439b38cd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f21266fa-3226-443f-a84d-a958497a5948": {
      "main": [
        [
          {
            "node": "745a8e10-7393-42e1-8d01-3808d5c0553a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5f7c8ef7-bd1a-4987-a976-69924d084c33": {
      "main": [
        [
          {
            "node": "d9b2fbbb-341f-4d20-b493-c48e7c1e56d7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b86d8fbd-7154-43f0-a722-e22ca8ac170a": {
      "main": [
        [
          {
            "node": "8da62bb5-391d-40ad-a9e3-e8a50f3d2983",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a39e75bc-a06d-4dfd-a521-579a5bd34838": {
      "ai_languageModel": [
        [
          {
            "node": "c0b48c24-42be-45ca-959d-ef0d439b38cd",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Création de contenu, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Workflows recommandés

✨🩷automatisationréseaux sociauxcontenupublication工厂 + 系统提示组合
基于动态系统提示etGPT-4odeAI驱动多平台réseaux sociauxcontenu工厂
If
Set
Code
+
If
Set
Code
100 NœudsAmit Mehta
Création de contenu
Automatisation de la publication RSS vers Medium avec Groq, Gemini et un système d'approbation Slack
Automatisation du flux de publication de RSS vers Medium avec Groq, Gemini et le système d'approbation Slack
If
Set
Code
+
If
Set
Code
41 NœudsObisDev
Création de contenu
Flux de travail automatisé SEO pour blog de mots-clés à WordPress avec GPT-5 et images fal.ai
Automatisation du flux de blog SEO des mots-clés vers WordPress avec GPT-5 et les images fal.ai
Set
Code
Wait
+
Set
Code
Wait
96 NœudsPaul
Création de contenu
Version professionnelle de l'automatisation de blog WordPress (recherche approfondie) v2.1 sur le marché
Automatisation de la création de blog optimisé pour le SEO avec GPT-4o, Perplexity AI et support multilingue
If
Set
Xml
+
If
Set
Xml
125 NœudsDaniel Ng
Création de contenu
Publication autonome de blog basée sur des vidéos YouTube
Publication autonome de blog à partir de vidéos YouTube avec ChatGPT, Sheets, Apify, Pexels et WordPress
If
Set
Code
+
If
Set
Code
80 NœudsOriol Seguí
Création de contenu
Processus de vente B2B complet : Génération de prospects Apollo, externalisation avec Mailgun et gestion des réponses IA
Processus de vente B2B complet : Génération de prospects Apollo, prospection Mailgun et gestion des réponses AI
If
Set
Code
+
If
Set
Code
116 NœudsPaul
Création de contenu
Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds14
Catégorie2
Types de nœuds8
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34