Convert Microsoft files (docx, xlsx, pptx) to google documents files respectively

Describe the problem/error/question

Hey
I have a DOCX file that I would like to upload to Google Drive and convert it to a Google document.
I see that it is possible through their API to convert to Google’s special formats.
How do I do this using n8n?

Information on your n8n setup

  • **n8n version: 1.34.2
  • **Database (default: SQLite): postgresql
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): queue
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • **Operating system: ubuntu 22.4

hello @sidney27

Google Docs node does not have that functionality (n8n mostly convers the basic functionality). So you have to use the HTTP Request node to make it working

Hi, @barn4k.
Do you have an example populated HTTP Request node? I have no idea how to do it.
Thanks.

Can you provide a link to the API?

HTTP Requests node should be used to access that API (you can use the credentials from Google nodes there)

@barn4k, this is the link to the Google API documentation Upload file data  |  Google Drive  |  Google for Developers.

In the documentation there is this part “Import to Google Docs types
When you create a file in Drive, you might want to convert the file into a Google Workspace file type, such as Google Docs or Sheets. For example, maybe you want to transform a document from your favorite word processor into a Docs to take advantage of its features.
To convert a file to a specific Google Workspace file type, specify the Google Workspace mimeType when creating the file.”

For anyone looking for a solution to this same problem, I used Google’s API to perform the conversion following the documentation

Follow my flow with the settings I used.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.