N8n Workflow: Zwei Mails, PDF-Analyse, Excel-Formatierung – komme nicht weiter

Hallo zusammen

Ich bin seit längerem dabei einen komplexeren Workflow zu erstellen. Leider komme ich nicht draus und es funktioniert einfach nicht so wie ich es möchte.

Kurz den Workflow erklärt:

  • Es kommen zwei Mails rein, eine mit PDF und eine mit Excel (Outlook 365)
  • Die PDF muss ausgewertet werden und klar trennen können
  • Die Excel muss als erstes in das Format 97-2003 .xls gespeichert werden in einem bestimmten Pfad auf dem Netzlaufwerk (zur Not auch in OneDrive)
  • In der gespeicherten Excel müssen dann erstmal zwei neue Zellen erstellt bzw. eingefügt werden

- Dann müssen gewisse Informationen in die neuen Spalten eingefügt werden, sowie einen Absender/Empfänger Vergleich in der Excel.

- Zum Schluss soll die Excel erneut in einem anderen Pfad gespeichert werden.

Outlook Credentials sind hinterlegt und funktionieren. Als KI Modell habe ich llama 3.2:3b, da der aktuelle KI PC nicht mehr packt. Später wenn ich ein paar Workflows habe kommt eine RTX Pro 6000 Blackwell zum Einsatz und ein grösseres KI Modell.

Könnt ihr mir da Helfen mit dem Workflow?

If you share your workflow or an image with it, maybe we can take a look and try to help in some way.

Sorry, hier ist der Workflow. Ich habe zwei Varianten versucht. Ich kann hier leider nur ein Screenshot und keine Datei anhängen.

### 1. Receiving Emails with Attachments (PDF & Excel)

- Use the **Microsoft Outlook Trigger** node to watch for incoming emails. You can filter for emails with PDF and Excel attachments and set the trigger to download attachments automatically. This is supported in n8n and is a common starting point for such workflows [Microsoft Outlook Trigger node]( Microsoft Outlook Trigger node documentation | n8n Docs ).

### 2. Processing the PDF

- For PDF extraction, you can use an HTTP Request node to send the PDF to a service like LlamaParse for parsing and data extraction. The process involves uploading the PDF, polling for completion, and then retrieving the parsed data. This can be done with HTTP Request, Switch, and Wait nodes as described in the official n8n blog [How to extract data from PDF to Excel/Spreadsheet: Advance parsing with n8n.io and LlamaParse]( How to extract data from PDF to Excel/Spreadsheet – n8n Blog ).

### 3. Handling the Excel File

- Use the **Microsoft Excel** node to interact with Excel files. You can read, update, and write data to Excel files stored in OneDrive or SharePoint. The node supports adding rows, updating cells, and retrieving worksheet content [Microsoft Excel 365 node]( Microsoft Excel 365 node documentation | n8n Docs ).

- To save the file in the 97-2003 .xls format, n8n does not natively convert between .xlsx and .xls formats. You may need to ensure the file is already in the correct format or use an external service/script for conversion before further processing. Saving to OneDrive is supported [Microsoft OneDrive node]( Microsoft OneDrive node documentation | n8n Docs ).

### 4. Modifying the Excel File

- You can add new columns (cells) and insert data using the Microsoft Excel node. For sender/recipient comparison, you would extract the relevant data from the email and PDF, then use n8n logic nodes (like Set, IF, or Code) to compare and write results into the Excel file.

### 5. Saving the Modified Excel

- Direct conversion to .xls (97-2003) format is not natively supported in n8n; you may need an external tool or script for this step.

- All other steps (email handling, PDF parsing, Excel editing, file saving) are supported with the nodes and integrations mentioned above.

- For advanced PDF parsing, LlamaParse is recommended and can be integrated via HTTP Request nodes .

1 Like

Vielen Dank für euere Antworten :slight_smile: Leider bekomme ich das irgendwie nicht zum laufen. Kann mir da jemand dabei helfen?