Convertir des documents Word OneDrive en PDF

Intermédiaire

Ceci est unFile Managementworkflow d'automatisation du domainecontenant 13 nœuds.Utilise principalement des nœuds comme If, Set, Wait, Gmail, Filter. Utiliser Foxit pour convertir automatiquement les documents Word OneDrive en PDF et les envoyer par Gmail

Prérequis
  • Compte Google et informations d'identification Gmail API
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "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": "Déclencheur Microsoft OneDrive",
      "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": "Obtenir le fichier",
      "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": "Définir le champ de fichier",
      "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": "Convertir en 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": "Filtrer pour 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": "Téléverser vers 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": "Vérifier la tâche",
      "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": "Attendre",
      "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": "La tâche est-elle terminée ?",
      "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": "Télécharger",
      "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": "Envoyer le PDF par email",
      "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": "Note adhésive",
      "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": "Note adhésive 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
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Gestion de fichiers

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds13
Catégorie1
Types de nœuds9
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
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.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34