I am trying to get attachments from emails, match the email to an account in GHL, find a folder for the account in my google drive and upload the attachments found in the email to the google drive folder. If a folder is not found, I am creating the folder and then trying to upload the same attachments.
I am using the code node to split out the binary data and returning single item for each file with a data key containing your binary file. I am then sending that to a merge node along with the id of my google drive folder to the merge node.
When trying to upload the data attachments to the id of the folder, I am unable to choose item 1 (where my attachments are from the merge node) and item 0 where my id is for the google drive folder.
What is the error message (if any)?
The name of the input field containing the binary file data must be set [item 0]
Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.
```
<your workflow>
```
That implies to any JSON output you would like to share with us.
Make sure that you have removed any sensitive information from your workflow and include dummy or pinned data with it!
Your merge configuration is not valid for your use case. Using “Append” mode implies separate items (one appended to the other in the array of items). You rather need setting it as “Combine” and match the apropriate fields to have both the ID and the binary combined in a single item.
I’m not quite sure what I am doing wrong here. Should the array only return 1 item? If so, how would I be able to upload all the attachments and not just 1. Can the merge node return 1 item with both files?