複数のGmail添付ファイルを取得してGoogle Driveにアップロード
初級
これはBuilding Blocks分野の自動化ワークフローで、3個のノードを含みます。主にFunction, GoogleDrive, GmailTriggerなどのノードを使用。 Gmail から複数の添付ファイルを取得して Google ドライブにアップロード
前提条件
- •Google Drive API認証情報
- •Googleアカウント + Gmail API認証情報
使用ノード (3)
カテゴリー
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"meta": {
"instanceId": "1a23006df50de49624f69e85993be557d137b6efe723a867a7d68a84e0b32704"
},
"nodes": [
{
"id": "3c7ae816-6ce2-4b6b-893e-75c6b8756555",
"name": "トリガー - 新着メール",
"type": "n8n-nodes-base.gmailTrigger",
"notes": "has:attachment",
"position": [
680,
300
],
"parameters": {
"simple": false,
"filters": {
"q": "has:attachment"
},
"options": {
"downloadAttachments": true
},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
}
},
"notesInFlow": true,
"typeVersion": 1.1
},
{
"id": "b87b2211-03d3-4742-98c9-977ae4a8d581",
"name": "バイナリデータ出力を添付",
"type": "n8n-nodes-base.function",
"position": [
900,
300
],
"parameters": {
"functionCode": "let results = [];\n\nfor (item of items) {\n for (key of Object.keys(item.binary)) {\n results.push({\n json: {\n fileName: item.binary[key].fileName\n },\n binary: {\n data: item.binary[key],\n }\n });\n }\n}\n\nreturn results;"
},
"typeVersion": 1
},
{
"id": "f8e19c97-0983-4365-bc63-179605050ef2",
"name": "ファイルを google ドライブにアップロード",
"type": "n8n-nodes-base.googleDrive",
"position": [
1140,
300
],
"parameters": {
"name": "={{ $json.fileName.split(\".\")[0] + \"-\" + $('Trigger - New Email').item.json.from.value[0].address + \".\" + $json.fileName.split(\".\")[1]}}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "root",
"cachedResultUrl": "https://drive.google.com/drive",
"cachedResultName": "/ (Root folder)"
}
},
"typeVersion": 3
}
],
"pinData": {},
"connections": {
"3c7ae816-6ce2-4b6b-893e-75c6b8756555": {
"main": [
[
{
"node": "b87b2211-03d3-4742-98c9-977ae4a8d581",
"type": "main",
"index": 0
}
]
]
},
"b87b2211-03d3-4742-98c9-977ae4a8d581": {
"main": [
[
{
"node": "f8e19c97-0983-4365-bc63-179605050ef2",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
初級 - ビルディングブロック
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
✨🔪Llama Parseに基づく高度なAIドキュメント解析とテキスト抽出
✨🔪 Llama Parseに基づいた高度なAIドキュメント解析とテキスト抽出
If
Set
Gmail
+
If
Set
Gmail
54 ノードJoseph LePage
ビルディングブロック
[テンプレート] AIペットショップ v8
AIペットショップアシスタント - GPT-4o、Googleカレンダー、WhatsApp/Instagram/Facebookを統合
If
N8n
Set
+
If
N8n
Set
244 ノードAmanda Benks
営業
受信したメールを新しい行としてGoogle Sheetsスプレッドシートに追加する
受信した新しいメールをGoogleスプレッドシートの新しい行として追加
Gmail Trigger
Google Sheets
Gmail Trigger
Google Sheets
4 ノードWeblineIndia
その他
高度なAIディスプレイ(AI開発者第14回集での発表)
高度なAIデモ(AI開発者第14回聚会で展示)
If
Code
Gmail
+
If
Code
Gmail
39 ノードMax Tkacz
ビルディングブロック
Notion データベースに空白ページをアーカイブ
Notion データベース内の空のページをアーカイブ
If
Cron
Notion
+
If
Cron
Notion
10 ノードJonathan
ビルディングブロック
JPG/PNG画像をWebP形式に変換
APYHubおよびGoogle Driveを使用した画像自動最適化:JPG/PNGからWebPへの変換
Set
Code
Switch
+
Set
Code
Switch
12 ノードDavide
その他