毎4時間ごとにUSD/JPY為替レートを分析してメールで結果を送信
中級
これは自動化ワークフローで、12個のノードを含みます。主にSet, Gmail, HttpRequest, Agent, ScheduleTriggerなどのノードを使用。 AIとTavilyニュース検索でドル/円レートを分析しメールレポートに
前提条件
- •Googleアカウント + Gmail API認証情報
- •ターゲットAPIの認証情報が必要な場合あり
使用ノード (12)
カテゴリー
-
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"meta": {
"instanceId": "15d6057a37b8367f33882dd60593ee5f6cc0c59310ff1dc66b626d726083b48d"
},
"name": "Analyze USD/JPY rate and email results every 4 hours",
"tags": [],
"nodes": [
{
"id": "4c0ddb6c-8600-4415-b43d-5f21ca6f4a20",
"name": "4時間ごとに実行",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-272,
288
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 4
}
]
}
},
"typeVersion": 1.2
},
{
"id": "772686d8-5109-4e73-bfe2-ea825c70fbf5",
"name": "メモ: スケジュール",
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
64
],
"parameters": {
"color": 5,
"width": 200,
"height": 150,
"content": "## Schedule\nRuns every 4 hours\n\nStarts the forex analysis pipeline"
},
"typeVersion": 1
},
{
"id": "9ca23927-bda5-4914-807c-944744976dbd",
"name": "メモ: レート取得",
"type": "n8n-nodes-base.stickyNote",
"position": [
176,
64
],
"parameters": {
"width": 200,
"height": 182,
"content": "## Fetch current exchange rate\nFetch the latest USD/JPY rate\n\nUses a free HTTP API"
},
"typeVersion": 1
},
{
"id": "a13e3fc1-2101-4916-a3dc-1fe6deb79c89",
"name": "USD/JPY分析 (AIエージェント)",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
448,
288
],
"parameters": {
"text": "=以下の情報を基にUSD/JPY(ドル円)の為替分析を行ってください:\n\n現在のレート: {{ $json.rates.JPY }} 円/ドル\n\nタスク:\n1. 最新のドル円関連ニュースを検索して分析\n2. テクニカル分析の観点から現在のトレンドを判定\n3. 買い・売り・様子見のいずれかを推奨\n4. その根拠を詳しく説明\n\n分析結果を日本語でまとめてください。",
"options": {
"systemMessage": "=role: |\n あなたは経験豊富な為替アナリストです。USD/JPY(ドル円)の分析を行い、テクニカル分析とファンダメンタル分析の両方の観点から投資判断を提供します。\n あなたの最も重要な役割は「ツールを必ず活用すること」です。特にニュース検索は自力で答えるのではなく、必ずツールを呼び出してください。\n\nenvironment: |\n 入力として現在の為替レートが提供されます。\n その後、あなたは以下の流れで動作してください:\n 1. **Search Forex News** ツールを呼び出し、最新のUSD/JPY関連ニュースを取得する。\n 2. 取得したニュースを分析し、ファンダメンタルの観点をまとめる。\n 3. テクニカル分析を行い、現在のトレンドを判定する。\n 4. 「買い・売り・様子見」のいずれかを必ず推奨し、その根拠を説明する。\n 5. 結果を構造化(recommendation, currentRate, technicalAnalysis, newsAnalysis, reasoning)して返す。\n\ntools:\n - name: Search Forex News\n description: USD/JPY(ドル円)に関する最新ニュースを取得する。\n must_use: true\n - name: Analysis Output Parser\n description: 構造化された出力(recommendation, currentRate, technicalAnalysis, newsAnalysis, reasoning)を生成する。\n must_use: true\n\nrules: |\n - すべての回答は日本語で出力する。\n - ニュースの取得は必ず **Search Forex News** ツール経由で行い、自分で想像して補完しない。\n - 出力は必ず **Analysis Output Parser** を通じて構造化する。\n - 曖昧なまま答えるのではなく、ツールを活用して不足情報を補う。"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2
},
{
"id": "bd210702-ef05-4f18-a99d-836628970d18",
"name": "LLMプロバイダー (設定)",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
336,
528
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "b924ba96-6fb4-4f50-ae33-6e63997d4e45",
"name": "メモ: LLMセットアップ",
"type": "n8n-nodes-base.stickyNote",
"position": [
272,
672
],
"parameters": {
"color": 3,
"width": 200,
"height": 150,
"content": "## LLM setup\nProvide your LLM provider credential in this node\n\nDefault: small/light model"
},
"typeVersion": 1
},
{
"id": "88b48c24-c1d2-4de7-89f9-31c557c126f4",
"name": "ツール: FXニュース検索 (Tavily)",
"type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
"position": [
544,
512
],
"parameters": {
"url": "https://api.tavily.com/search",
"method": "POST",
"jsonBody": "={\n \"api_key\": \"={{ $json.tavilyApiKey }}\",\n \"query\": \"{searchTerm}\",\n \"search_depth\": \"advanced\",\n \"include_answer\": true,\n \"topic\": \"finance\",\n \"include_raw_content\": true,\n \"max_results\": 5\n}",
"sendBody": true,
"specifyBody": "json",
"toolDescription": "USD/JPY(ドル円)に関する最新ニュースを検索",
"placeholderDefinitions": {
"values": [
{
"name": "searchTerm",
"type": "string",
"description": "Edit the query if you want to focus on specific events (e.g., BoJ, FOMC, yields)."
}
]
}
},
"typeVersion": 1.1
},
{
"id": "2bf64e09-14c7-4534-9e36-294c39239352",
"name": "ツール: 構造化出力パーサー",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
688,
512
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"recommendation\": {\n \"type\": \"string\",\n \"description\": \"買い、売り、様子見のいずれかの推奨\"\n },\n \"currentRate\": {\n \"type\": \"string\",\n \"description\": \"現在のUSD/JPYレート\"\n },\n \"technicalAnalysis\": {\n \"type\": \"string\",\n \"description\": \"テクニカル分析の詳細\"\n },\n \"newsAnalysis\": {\n \"type\": \"string\",\n \"description\": \"最新ニュースの分析結果\"\n },\n \"reasoning\": {\n \"type\": \"string\",\n \"description\": \"推奨の根拠と詳細な説明\"\n }\n },\n \"required\": [\"recommendation\", \"currentRate\", \"technicalAnalysis\", \"newsAnalysis\", \"reasoning\"]\n}"
},
"typeVersion": 1.2
},
{
"id": "94430eeb-9636-4509-81fe-7ebe89b04ff4",
"name": "メモ: メールセットアップ",
"type": "n8n-nodes-base.stickyNote",
"position": [
752,
64
],
"parameters": {
"color": 6,
"width": 200,
"height": 182,
"content": "## Email settings\nConfigure your email credential (Gmail or SMTP)\n\nRecipient is controlled via the **Set (Fields)** node"
},
"typeVersion": 1
},
{
"id": "95e39659-8e9c-46c6-8603-ed89ed5d1ee1",
"name": "Gmail で結果を送信",
"type": "n8n-nodes-base.gmail",
"position": [
800,
288
],
"webhookId": "7b2cd3c6-0dc4-4226-9bd3-15c28199e278",
"parameters": {
"sendTo": "={{ $json.notifyEmail }}",
"message": "={{ JSON.stringify($json.output) }}",
"options": {},
"subject": "USD/JPY analysis result"
},
"typeVersion": 2.1
},
{
"id": "c9d40300-0332-4409-ba47-349339536b24",
"name": "設定 (フィールド) — 設定してください",
"type": "n8n-nodes-base.set",
"position": [
0,
288
],
"parameters": {
"values": {
"string": [
{
"name": "tavilyApiKey",
"value": "<YOUR_TAVILY_API_KEY>"
},
{
"name": "notifyEmail",
"value": "<YOUR_EMAIL_ADDRESS>"
}
]
},
"options": {}
},
"typeVersion": 2
},
{
"id": "4e0e0f6f-e9a2-42ba-a633-d04e0f664594",
"name": "USD/JPYレートを取得 (HTTP)",
"type": "n8n-nodes-base.httpRequest",
"position": [
224,
288
],
"parameters": {
"url": "https://api.exchangerate-api.com/v4/latest/USD",
"options": {}
},
"typeVersion": 4.2
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "",
"connections": {
"4c0ddb6c-8600-4415-b43d-5f21ca6f4a20": {
"main": [
[
{
"node": "c9d40300-0332-4409-ba47-349339536b24",
"type": "main",
"index": 0
}
]
]
},
"bd210702-ef05-4f18-a99d-836628970d18": {
"ai_languageModel": [
[
{
"node": "a13e3fc1-2101-4916-a3dc-1fe6deb79c89",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"4e0e0f6f-e9a2-42ba-a633-d04e0f664594": {
"main": [
[
{
"node": "a13e3fc1-2101-4916-a3dc-1fe6deb79c89",
"type": "main",
"index": 0
}
]
]
},
"a13e3fc1-2101-4916-a3dc-1fe6deb79c89": {
"main": [
[
{
"node": "95e39659-8e9c-46c6-8603-ed89ed5d1ee1",
"type": "main",
"index": 0
}
]
]
},
"c9d40300-0332-4409-ba47-349339536b24": {
"main": [
[
{
"node": "4e0e0f6f-e9a2-42ba-a633-d04e0f664594",
"type": "main",
"index": 0
}
]
]
},
"2bf64e09-14c7-4534-9e36-294c39239352": {
"ai_outputParser": [
[
{
"node": "a13e3fc1-2101-4916-a3dc-1fe6deb79c89",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"88b48c24-c1d2-4de7-89f9-31c557c126f4": {
"ai_tool": [
[
{
"node": "a13e3fc1-2101-4916-a3dc-1fe6deb79c89",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
中級
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
n8nノードの探索(可視化リファレンスライブラリ内)
n8nノードを可視化リファレンスライブラリで探索
If
Ftp
Set
+
If
Ftp
Set
113 ノードI versus AI
その他
AI業界トレンド24/7監視(X、Gmail、ウェブサイト)
GPT-5を基盤としたAI業界トレンドの24時間365日監視(X、Gmail、ウェブサイト)
Set
Gmail
Airtop
+
Set
Gmail
Airtop
35 ノードLeeWei
市場調査
自動ニュース要約AIエージェントv13
AIニュース制作チーム:24/7リポート自動化+Perplexity引用
Set
Code
Gmail
+
Set
Code
Gmail
37 ノードDerek Cheung
プロダクト
AI研究エージェント:Mistral最適OCRによるPDF自動分析
AI研究エージェント:Mistral最適OCRによるPDF自動分析
Set
Code
Gmail
+
Set
Code
Gmail
30 ノードDerek Cheung
人工知能
AI驱动のメール分诊与自動回复系统,統合OpenAIエージェントとGmail
AI驱动のメール分诊与自動回复系统,統合OpenAIエージェントとGmail
If
Set
Gmail
+
If
Set
Gmail
68 ノードAbdullahi Ahmed
コンテンツ作成
Gmailへn8nによる送信タイムリミットの通知
AIベースのn8nリリースノート要約通知(Gmail経由でGPT-5-Miniを使用)
Set
Code
Html
+
Set
Code
Html
16 ノードJeff Huera
個人の生産性