Outlook Node Draft Creation Fails

I am having a problem where, when I try to attach a file to a draft I have created using the Outlook node, it keeps failing. I have tried all the possible variations I could find, and this seems to be the correct procedure. I have also tried adding another item or transferring the data directly as base64, but nothing works.
Does anyone know about the “were unable to deserialize” error and can tell me what I am doing wrong or suggest a workaround?
Many thanks in advance.

What is the error message (if any)?

Please share your workflow


Share the output returned by the last node

Information on your n8n setup

  • n8n version: 2.02 Cloud
  • Database (default: SQLite): -
  • n8n EXECUTIONS_PROCESS setting (default: own, main):-
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Cloud
  • Operating system:-

hi @HR_Immo have you found a solution to this error? Even I am facing the same issue. If possible could you share the node diagram you have configured

Hi, no i haven´t found any solution to this problem. But i found out a workaroud, where you directly adress the Microsoft Graph API via the essassery endpoint on a http node:

https://graph.microsoft.com/v1.0/users/[email protected]/messages/{draftId}/attachments

There you can sennd this JSON Body:
{
@odata.type”: “microsoft.graph.fileAttachment”,
“name”: “name.pdf”,
“contentType”: “application/pdf”,
“contentBytes”: “{{ $json.data.replace(/\s+/g, ‘’) }}”
}

And you will need to connect an Acccount for the API like for the Mail Account.

This shloud work as a workaround! :blush: