Possivel erro no nó Facebook Graph API

Describe the problem/error/question

My problem is in sending binary files uploaded using Facebook Graph API, test with URL using edge photos and it works perfectly, however, when trying to upload a binary file I get the following error:

What is the error message (if any)?

Bad request - please check your parameters

(#324) Requires upload file

Please share your workflow

In some searches I found that I need to change the Body Type: ‘Form-Data’, but in the facebook node there is no such option. By enabling the option to send binary files, is N8N mishandling this option? I know I can use HTTP Request, but I’m looking to use the default node for didactic reasons. If anyone can give me a hint of the problem or if in fact the N8N has an error on this node.

Information on your n8n setup

  • **n8n version:1.56.2
  • **Database (default: SQLite)
  • **Running n8n via Docker Self Host
  • **Operating system: ubuntu-20.04-x86_64
1 Like

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Hey @mmp , I suspect your reference to the binary file is not correct. Here’s the screenshot of the successful request.

I am running up against the same problem. I’m beginning to come to the conclusion that n8n is not able to post photos to Facebook. I’ve been searching the Internet for the past couple days looking for solutions and there seems to be zero examples of n8n posting images to Facebook. I get the error:
n8n version

1.58.2 (Cloud)

Stack trace

TypeError: binaryPropertyNameFull.includes is not a function
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Facebook/FacebookGraphApi.node.js:369:44)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:722:19)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:670:51
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1100:20

@lwbc-n8n , you seem to stumble against the same mis-configuration. Instead of the expression {{ $binary }} you need to add a fixed value body as per my earlier screenshot.

Yes I checked, the binary file is generated with the name imagem_0

You still seems to be missing my point. You just need to specify the name of the variable that reference the binary. In my example that was data. That is exactly what needs to be used in the connected node, not {{ $binary }}, not {{ $binary.data }}, just data.

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