OneDriveのWord文書をPDFに変換

中級

これはFile Management分野の自動化ワークフローで、13個のノードを含みます。主にIf, Set, Wait, Gmail, Filterなどのノードを使用。 Foxitを使用してOneDriveのWordドキュメントを自動のにPDFに変換してGmailで送信

前提条件
  • Googleアカウント + Gmail API認証情報
  • ターゲットAPIの認証情報が必要な場合あり

カテゴリー

ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "qrBRgBi0nd8VY7sc",
  "meta": {
    "instanceId": "8a623c3f1a4c9388f43b80af022dca52562aec4339b44f00a07491999dffc00f",
    "templateCredsSetupCompleted": true
  },
  "name": "Convert OneDrive Word doc to PDF",
  "tags": [
    {
      "id": "Swe6KzLGcdB7njAR",
      "name": "PDF",
      "createdAt": "2025-07-14T17:02:10.668Z",
      "updatedAt": "2025-07-14T17:02:10.668Z"
    },
    {
      "id": "oMYiaJ6wcHDq684x",
      "name": "Conversion",
      "createdAt": "2025-07-14T17:02:14.256Z",
      "updatedAt": "2025-07-14T17:02:14.256Z"
    },
    {
      "id": "FB1YRnU695c41dkP",
      "name": "Foxit",
      "createdAt": "2025-07-14T17:02:18.561Z",
      "updatedAt": "2025-07-14T17:02:18.561Z"
    }
  ],
  "nodes": [
    {
      "id": "d4319891-723a-4492-ad66-effc03dc642d",
      "name": "Microsoft OneDrive Trigger",
      "type": "n8n-nodes-base.microsoftOneDriveTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "id",
          "value": "01IZFFBT44M7VRGRBPXJBJHXORCT5YINXH"
        },
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "watchFolder": true
      },
      "credentials": {
        "microsoftOneDriveOAuth2Api": {
          "id": "dCZgCwfVNRcpQL4r",
          "name": "Microsoft Drive account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "beec5178-3de1-44a0-9f53-6d40deae295e",
      "name": "ファイルを取得",
      "type": "n8n-nodes-base.microsoftOneDrive",
      "position": [
        480,
        0
      ],
      "parameters": {
        "fileId": "={{ $items('Microsoft OneDrive Trigger')[0].json.id }}",
        "operation": "download"
      },
      "credentials": {
        "microsoftOneDriveOAuth2Api": {
          "id": "dCZgCwfVNRcpQL4r",
          "name": "Microsoft Drive account"
        }
      },
      "executeOnce": false,
      "typeVersion": 1
    },
    {
      "id": "39a5e363-80fd-49d3-98f7-6c868fa6189e",
      "name": "ファイルフィールドを設定",
      "type": "n8n-nodes-base.set",
      "position": [
        700,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "5a4c6404-42bf-433b-894a-154bf47d1217",
              "name": "bits",
              "type": "string",
              "value": "={{ data }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "58633032-2696-4f47-8b78-e5550c108fe4",
      "name": "PDFに変換",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1160,
        0
      ],
      "parameters": {
        "url": "https://na1.fusion.foxit.com/pdf-services/api/documents/create/pdf-from-word",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"documentId\": \"{{ $json.documentId }}\"\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpCustomAuth"
      },
      "credentials": {
        "httpCustomAuth": {
          "id": "itvQ81oceu7Z42Sz",
          "name": "Custom Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "0d452501-d57c-48b0-96e3-1e553580db98",
      "name": "Wordでフィルター",
      "type": "n8n-nodes-base.filter",
      "position": [
        220,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "e8875bfc-7f4a-4d08-8b45-a216b95f742a",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{$json.mimeType }}",
              "rightValue": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "5ad3be23-cbda-4710-bb24-e522981e6b75",
      "name": "Foxitにアップロード",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        920,
        0
      ],
      "parameters": {
        "url": "https://na1.fusion.foxit.com/pdf-services/api/documents/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "=file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "genericAuthType": "httpCustomAuth"
      },
      "credentials": {
        "httpCustomAuth": {
          "id": "itvQ81oceu7Z42Sz",
          "name": "Custom Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e1874368-beb4-43ef-83d0-9e203fdee282",
      "name": "タスクを確認",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1380,
        0
      ],
      "parameters": {
        "url": "=https://na1.fusion.foxit.com/pdf-services/api/tasks/{{$json.taskId}}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpCustomAuth"
      },
      "credentials": {
        "httpCustomAuth": {
          "id": "itvQ81oceu7Z42Sz",
          "name": "Custom Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "d28c9c29-8c3a-4bae-890d-72998bc87f1f",
      "name": "待機",
      "type": "n8n-nodes-base.wait",
      "position": [
        1980,
        100
      ],
      "webhookId": "e4b89533-2e60-4eba-822d-21b882c32183",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "8e42d320-6c61-4669-9ed0-a957fa802e18",
      "name": "ジョブは完了したか?",
      "type": "n8n-nodes-base.if",
      "position": [
        1600,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "fa958cdc-d7a8-49b9-b577-13429bd7bcf5",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "COMPLETED"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "62b6aee1-6dea-4511-97f8-0604377ef29c",
      "name": "ダウンロード",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2000,
        -80
      ],
      "parameters": {
        "url": "=https://na1.fusion.foxit.com/pdf-services/api/documents/{{ $json.resultDocumentId}}/download",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpCustomAuth"
      },
      "credentials": {
        "httpCustomAuth": {
          "id": "itvQ81oceu7Z42Sz",
          "name": "Custom Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "a89ed3e9-0fb1-4fb4-a3f9-627399602783",
      "name": "PDFをメール送信",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2400,
        -60
      ],
      "webhookId": "61ce5be6-e955-4efa-b871-95172539d45d",
      "parameters": {
        "sendTo": "raymondcamden@gmail.com",
        "message": "Enjoy your shiny PDF.",
        "options": {
          "attachmentsUi": {
            "attachmentsBinary": [
              {}
            ]
          }
        },
        "subject": "New Document"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "A7SxJ0FWjVNKGOnA",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "7454b3fc-cce6-4ea7-a0c1-a3a17f86cbc4",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        860,
        -220
      ],
      "parameters": {
        "width": 1460,
        "height": 640,
        "content": "## Foxit PDF Services\n\nThis block handles the integration with [Foxit PDF Services](https://developer-api.foxit.com/pdf-services/). You will need to get your own credentials to let this work."
      },
      "typeVersion": 1
    },
    {
      "id": "6ca1406b-ee37-4df7-b1df-628cc9d55f40",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -560
      ],
      "parameters": {
        "color": 5,
        "width": 700,
        "height": 360,
        "content": "## Requirements\n\nThis flow makes use of three things that you'll need to setup. First, is an active OneDrive account with a specific folder ID. That be a bit tricky and you *could* modify it to just use an entire account, just be careful.\n\nSecondly, you'll need credentials for [Foxit PDF Services](https://developer-api.foxit.com/pdf-services/), there's a free trial available.\n\nLastly, it emails the result to a user, in this case, me, so be sure to setup your own GMail auth, and change the TO field unless you want me to get your documents. ;)"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1"
  },
  "versionId": "56bdb01a-d76c-45c9-b8e5-87e981af6258",
  "connections": {
    "d28c9c29-8c3a-4bae-890d-72998bc87f1f": {
      "main": [
        [
          {
            "node": "8e42d320-6c61-4669-9ed0-a957fa802e18",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "62b6aee1-6dea-4511-97f8-0604377ef29c": {
      "main": [
        [
          {
            "node": "a89ed3e9-0fb1-4fb4-a3f9-627399602783",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "beec5178-3de1-44a0-9f53-6d40deae295e": {
      "main": [
        [
          {
            "node": "39a5e363-80fd-49d3-98f7-6c868fa6189e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e1874368-beb4-43ef-83d0-9e203fdee282": {
      "main": [
        [
          {
            "node": "8e42d320-6c61-4669-9ed0-a957fa802e18",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "58633032-2696-4f47-8b78-e5550c108fe4": {
      "main": [
        [
          {
            "node": "e1874368-beb4-43ef-83d0-9e203fdee282",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0d452501-d57c-48b0-96e3-1e553580db98": {
      "main": [
        [
          {
            "node": "beec5178-3de1-44a0-9f53-6d40deae295e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "39a5e363-80fd-49d3-98f7-6c868fa6189e": {
      "main": [
        [
          {
            "node": "5ad3be23-cbda-4710-bb24-e522981e6b75",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5ad3be23-cbda-4710-bb24-e522981e6b75": {
      "main": [
        [
          {
            "node": "58633032-2696-4f47-8b78-e5550c108fe4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8e42d320-6c61-4669-9ed0-a957fa802e18": {
      "main": [
        [
          {
            "node": "62b6aee1-6dea-4511-97f8-0604377ef29c",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "d28c9c29-8c3a-4bae-890d-72998bc87f1f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d4319891-723a-4492-ad66-effc03dc642d": {
      "main": [
        [
          {
            "node": "0d452501-d57c-48b0-96e3-1e553580db98",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級 - ファイル管理

有料ですか?

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

関連ワークフロー

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

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

作成者
Raymond Camden

Raymond Camden

@raymondcamden

As an API Evangelist for Foxit, Raymond Camden specializes in the power of APIs, the web platform, and generative AI. A prolific author and seasoned presenter, he has been a prominent voice in the developer community for over two decades. You can explore his work and insights on his long-running blog at www.raymondcamden.com or reach him directly at raymondcamden@gmail.com.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34