Geminiを使ってWordPressからAI駆動型の週次メールニュースを生成
中級
これはSocial Media, Multimodal AI分野の自動化ワークフローで、8個のノードを含みます。主にIf, Code, EmailSend, Wordpress, Agentなどのノードを使用。 Geminiを使ってWordPressからAI駆動の週次メールニュースレターへ生成する
前提条件
- •Google Gemini API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"meta": {
"instanceId": "2000c64071c20843606b95c63795bb0797c41036047055a6586498e855b96efc",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "88ced829-6881-4846-93b1-b2f7d1779841",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
768,
80
],
"parameters": {
"width": 380,
"height": 460,
"content": "## Weekly Email Newsletter Generator\n\n**What it does:**\n- Fetches your latest WordPress posts every Friday\n- AI creates engaging newsletter content\n- Sends formatted emails to your subscriber list\n- Tracks which posts were included to avoid duplicates\n\n**Setup Required:**\n1. Configure WordPress credentials to fetch posts\n2. Set up SMTP email credentials (Gmail, SendGrid, Mailgun, etc.)\n3. Replace email addresses in Send Newsletter node with your subscriber list\n4. Set up Google Gemini API credentials for AI\n\n**Customization:**\n- Change schedule (currently Friday 10 AM)\n- Adjust number of posts to include\n- Modify email template and styling\n- Add custom intro/outro messages\n\n**Need Help?**\nFor n8n coaching or one-on-one consultation:\nmailto:david@daexai.com"
},
"typeVersion": 1
},
{
"id": "c6dd067a-b2b4-4fc4-b14d-d300aa789437",
"name": "毎週金曜日10時",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
976,
192
],
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 10 * * 5"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "396b5f52-a71c-4235-9409-25850114eda3",
"name": "最近の投稿を取得",
"type": "n8n-nodes-base.wordpress",
"position": [
1168,
192
],
"parameters": {
"options": {},
"operation": "getAll"
},
"typeVersion": 1
},
{
"id": "08ae5166-ef2d-47db-9138-6de7a1621d95",
"name": "投稿の存在を確認",
"type": "n8n-nodes-base.if",
"position": [
1376,
192
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c0a1b2c3-d4e5-f6g7-h8i9-j0k1l2m3n4o5",
"operator": {
"type": "number",
"operation": "gt"
},
"leftValue": "={{$json.length}}",
"rightValue": 0
}
]
}
},
"typeVersion": 2
},
{
"id": "97d30b53-49ab-4e86-910e-a23550a9cb4e",
"name": "AIニュースレター作成",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1568,
192
],
"parameters": {
"options": {
"systemMessage": "You are an email newsletter writer. Create an engaging weekly newsletter based on the provided blog posts. Include: 1) Catchy subject line, 2) Personal greeting, 3) Brief intro about this week's content, 4) Formatted summaries of each post with compelling descriptions, 5) Call-to-action to read full posts, 6) Friendly sign-off. Keep it conversational and engaging. Format in HTML for email."
}
},
"typeVersion": 2.2
},
{
"id": "aa3ee18d-2858-456b-a3de-c3ec6888d87f",
"name": "ニュースレターコンテンツを解析",
"type": "n8n-nodes-base.code",
"position": [
1952,
192
],
"parameters": {
"jsCode": "const items = $input.all();\n\nreturn items.map(item => {\n // Remove markdown code blocks and parse JSON\n let aiOutput = item.json.output;\n \n // Remove ```json and ``` markers if present\n aiOutput = aiOutput.replace(/```json\\s*/, '').replace(/```\\s*$/, '');\n \n // Try to parse as JSON, fallback to plain text\n let parsedOutput;\n try {\n parsedOutput = JSON.parse(aiOutput.trim());\n } catch (e) {\n // If not JSON, treat as plain text\n parsedOutput = {\n subject: \"Weekly Newsletter - \" + new Date().toLocaleDateString(),\n content: aiOutput\n };\n }\n \n return {\n json: {\n subject: parsedOutput.subject || \"Weekly Newsletter - \" + new Date().toLocaleDateString(),\n content: parsedOutput.content || aiOutput,\n date: new Date().toISOString()\n }\n };\n});"
},
"typeVersion": 2
},
{
"id": "759e35de-6eaa-4b3e-b1a1-94d9d029a4d3",
"name": "ニュースレターを送信",
"type": "n8n-nodes-base.emailSend",
"position": [
2144,
192
],
"webhookId": "0dd49cd6-d161-4597-adbb-1abedc6f0248",
"parameters": {
"html": "={{$json.content}}",
"options": {},
"subject": "={{$json.subject}}",
"toEmail": "=subscribers@yourlist.com,subscriber2@email.com,subscriber3@email.com",
"fromEmail": "newsletter@yoursite.com",
"emailFormat": "html"
},
"credentials": {
"smtp": {
"id": "0xVva6dyyi5SuxBe",
"name": "SMTP account"
}
},
"typeVersion": 2
},
{
"id": "48dc6212-0580-40f5-94ba-5f6dc3f207d8",
"name": "Google Gemini Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
1472,
384
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"id": "wNw45YZvXXpeocJ2",
"name": "TST API"
}
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"08ae5166-ef2d-47db-9138-6de7a1621d95": {
"main": [
[
{
"node": "97d30b53-49ab-4e86-910e-a23550a9cb4e",
"type": "main",
"index": 0
}
]
]
},
"396b5f52-a71c-4235-9409-25850114eda3": {
"main": [
[
{
"node": "08ae5166-ef2d-47db-9138-6de7a1621d95",
"type": "main",
"index": 0
}
]
]
},
"c6dd067a-b2b4-4fc4-b14d-d300aa789437": {
"main": [
[
{
"node": "396b5f52-a71c-4235-9409-25850114eda3",
"type": "main",
"index": 0
}
]
]
},
"97d30b53-49ab-4e86-910e-a23550a9cb4e": {
"main": [
[
{
"node": "aa3ee18d-2858-456b-a3de-c3ec6888d87f",
"type": "main",
"index": 0
}
]
]
},
"48dc6212-0580-40f5-94ba-5f6dc3f207d8": {
"ai_languageModel": [
[
{
"node": "97d30b53-49ab-4e86-910e-a23550a9cb4e",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"aa3ee18d-2858-456b-a3de-c3ec6888d87f": {
"main": [
[
{
"node": "759e35de-6eaa-4b3e-b1a1-94d9d029a4d3",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
中級 - ソーシャルメディア, マルチモーダルAI
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
Gemini AI と Blotato を使って WordPress 記事を自動のにソーシャルメディアに投稿する
Gemini AI と Blotato を使って WordPress 記事を自動のにソーシャルメディアに投稿する
If
Code
Split Out
+
If
Code
Split Out
11 ノードDavid Olusola
ソーシャルメディア
Gemini AIでGitHubの人気リポジトリから週次のチュートリアルを自動生成し、WordPressに投稿
Gemini AI を使って GitHub 人気リポジトリから週次チュートリアルを自動生成し WordPress に投稿
Code
Split Out
Email Send
+
Code
Split Out
Email Send
9 ノードDavid Olusola
コンテンツ作成
NewsAPIとGoogle Geminiを使用してテクノロジーニュースブログ記事を自動生成し、WordPressに公開
NewsAPIとGoogle Geminiを使用して自動のにテクノロジーニュースブログ記事を生成し、WordPressに投稿
Code
Wordpress
Http Request
+
Code
Wordpress
Http Request
9 ノードDavid Olusola
コンテンツ作成
ArunavaのマルチエージェントインタリジャエントReddit自動化
AIによるブランドメンションとBaserowを使用してRedditの投稿に自動のにコメントを投稿
If
Set
Code
+
If
Set
Code
35 ノードArunava
ソーシャルメディア
RSS から LinkedIn への自動投稿機能
RSS + Gemini AI + Templated.ioを使用してLinkedInの企業ページに自動のに企画立案し公開
If
Code
Linked In
+
If
Code
Linked In
19 ノードShrishti S Nagar
ソーシャルメディア
旧WordPress記事を自動のに下書きステータスにアーカイブ
旧WordPress記事を自動のに下書きステータスにアーカイブ
If
Email Send
Wordpress
+
If
Email Send
Wordpress
7 ノードDavid Olusola
ファイル管理
ワークフロー情報
難易度
中級
ノード数8
カテゴリー2
ノードタイプ8
作成者
David Olusola
@dae221I help ambitious businesses eliminate operational bottlenecks and scale faster with AI automation. My clients typically see 40-60% efficiency gains within 90 days. Currently accepting 3 new projects this quarter - david@daexai.com
外部リンク
n8n.ioで表示 →
このワークフローを共有