AIAutomationPro による Google Drive へのバックアップ資格情報

中級

これはDevOps, IT Ops分野の自動化ワークフローで、9個のノードを含みます。主にCode, Aggregate, GoogleDrive, ConvertToFile, ManualTriggerなどのノードを使用。 n8n の資格情報を Google Drive へ自動バックアップ、その実行時間を設定

前提条件
  • Google Drive API認証情報

カテゴリー

ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "a0wJocTNabVjrlee",
  "meta": {
    "instanceId": "b3df22d2875c82e3ba1883c50049ed9cee0bcabf99d2b486961d2245a09e3964",
    "templateCredsSetupCompleted": true
  },
  "name": "AIAutomationPro Backup Credentials To Google Drive",
  "tags": [],
  "nodes": [
    {
      "id": "550155aa-dfd0-4bbe-b3c7-26891c1903dd",
      "name": "クリックトリガー",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        60,
        280
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "000cbe87-24bb-41a2-a6db-4dc12529b191",
      "name": "コマンド実行: 全認証情報取得",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        520,
        280
      ],
      "parameters": {
        "command": "npx n8n export:credentials --all --decrypted"
      },
      "typeVersion": 1
    },
    {
      "id": "1d6c568b-1bbd-458c-b5c9-d209a6cc44e5",
      "name": "JSON データフォーマット",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        280
      ],
      "parameters": {
        "jsCode": "// Function to beautify JSON\nfunction beautifyJson(jsonString) {\n  try {\n    // Parse the JSON string\n    const jsonObject = JSON.parse(jsonString);\n\n    // Format the JSON with indentation\n    return jsonObject; // Return the parsed object directly\n  } catch (error) {\n    // Return the error message if JSON is invalid\n    return `Invalid JSON: ${error.message}`;\n  }\n}\n\n// Retrieve the JSON object from the input data\nconst input = $input.all()[0].json;\n\n// Extract the JSON string from the stdout field\nconst jsonString = input.stdout.match(/\\[{.*}\\]/s);\n\n// Check if a valid JSON string is found\nif (!jsonString) {\n  return {\n    json: {\n      error: \"No valid JSON string found in stdout.\"\n    }\n  };\n}\n\n// Beautify the JSON\nconst beautifiedJson = beautifyJson(jsonString[0]);\n\n// Output the beautified JSON, ensuring each entry is in an object with a 'json' key\nconst output = beautifiedJson.map(entry => ({ json: entry }));\n\n// Return the output\nreturn output;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "2c41e6b0-b1c2-4102-a37f-403b5438caf3",
      "name": "認証情報集約",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        920,
        280
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "d6a08fd5-16c6-4746-ab23-9dd956eda393",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        200
      ],
      "parameters": {
        "width": 911,
        "height": 292,
        "content": "## Export All Credentials From N8n"
      },
      "typeVersion": 1
    },
    {
      "id": "458c133d-ce5e-4fc5-9af5-79b04e86a18d",
      "name": "ファイル変換",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1120,
        280
      ],
      "parameters": {
        "options": {},
        "operation": "toJson",
        "binaryPropertyName": "=data"
      },
      "typeVersion": 1.1
    },
    {
      "id": "0e39d74f-53ee-4b9e-b213-97bfaa605e78",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        200
      ],
      "parameters": {
        "width": 311,
        "height": 292,
        "content": "## Google Drive Folder"
      },
      "typeVersion": 1
    },
    {
      "id": "afd3b1ce-bd9e-4dda-bb9a-d27f343f57a1",
      "name": "Google Drive ファイルアップロード",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1540,
        280
      ],
      "parameters": {
        "name": "=n8n_backup_credentials.json",
        "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": "1p447S9MWYcRpA6dmfDe-Kdc3-d8L2Lzr",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1p447S9MWYcRpA6dmfDe-Kdc3-d8L2Lzr",
          "cachedResultName": "Tung Backup Credential"
        },
        "inputDataFieldName": "=data"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "q8OibtSjVurZl2tb",
          "name": "AI Auto Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "62a9e8c8-9731-459b-98c7-9befaf4c7cce",
      "name": "スケジュールトリガー",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        60,
        480
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "35978b6b-b4a2-4fce-a3bf-3ecf1f6c3e55",
  "connections": {
    "458c133d-ce5e-4fc5-9af5-79b04e86a18d": {
      "main": [
        [
          {
            "node": "afd3b1ce-bd9e-4dda-bb9a-d27f343f57a1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "550155aa-dfd0-4bbe-b3c7-26891c1903dd": {
      "main": [
        [
          {
            "node": "000cbe87-24bb-41a2-a6db-4dc12529b191",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "62a9e8c8-9731-459b-98c7-9befaf4c7cce": {
      "main": [
        [
          {
            "node": "000cbe87-24bb-41a2-a6db-4dc12529b191",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1d6c568b-1bbd-458c-b5c9-d209a6cc44e5": {
      "main": [
        [
          {
            "node": "2c41e6b0-b1c2-4102-a37f-403b5438caf3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2c41e6b0-b1c2-4102-a37f-403b5438caf3": {
      "main": [
        [
          {
            "node": "458c133d-ce5e-4fc5-9af5-79b04e86a18d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "000cbe87-24bb-41a2-a6db-4dc12529b191": {
      "main": [
        [
          {
            "node": "1d6c568b-1bbd-458c-b5c9-d209a6cc44e5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

中級 - DevOps, IT運用

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

ワークフロー情報
難易度
中級
ノード数9
カテゴリー2
ノードタイプ8
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

作成者
Daniel Ng

Daniel Ng

@danielng

A Growth Hacker, Digital Marketer & AI Automation Builder with 10+ years of experience in Digital Marketing & Workflow Automation. Based in Helsinki, Finland. For questions about my templates and customization, contact me at: daniel@aiautomationpro.org

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34