I am writing a Google Workspace Add-on. In this addon, I am writing an Action event handler for a button. What this Action needs to do is convert a GDOC to DOCX and then send it to an external web server using the POST http method.

The problem is that in order to POST the file, it needs to be a Blob - not the Apps Script version of Blob, just a normal JavaScript Blob. I tried to instantiate this Blob but Apps Script doesn't recognise it. I believe this is because the code isn't running inside a browser.

Does anyone know a standard approach to POST data, such as a DOCX, to an external web server from an Action?

I have the DOCX in a byte array format but I don't know what the next step is to POST it.

Thank you.