Hello y’all,
I have troubles with pulling an image from Google Drive as binary file and the passing it on to GitHub to create a new file inside a repository.
I’m using https://n8n.io/ (not self-hosted) with the following workflow:
Now, you can see below that I fetch the image and store the binary data inside data
Now, in the following node, when I try to access it, it consistently throws an error:
What am I missing? In another workflow, I can easily access the data
binary to get the file content.
Thanks
Hello,
If you link directly the Google Drive “download” node to the Github “create file” node, does it work ?
The error message says that the “node’s input data must contain a binary file”, but the input node (the one before the Github “create file” one) is a Google Docs node “Fetch blog post”, not the Google Drive one.
Thanks for the tip.
I have come one step closer, yet now the problem seems to be that the binary file is not base64 encoded:
I then proceeded to add an Extract from File node in between:
Under Options I set File Encoding > base64
Yet again… no luck with any constellation I try:
It has become really frustrating.
Hey, this one worked for me, can you try it ? Also, make sure that the file doesn’t exist when you commit it (or pass to an “Edit file” Github node).
I eventually got it to work like this:
The key was to call the converted file in the GitHub node like this: {{ $json.data }}
Thanks for your help!
1 Like