Error when posting file to Facebook

Hi!

I recieve error Incorrect number of files uploaded. Must upload exactly one file. when trying to send a Messenger message with Facebook Graph API or the HTTP request. (I’ve deleted my actual keys beforet posting but they are in the project).

curl -F 'recipient={"id":"<actual_user>"}' -F 'message={"attachment":{"type":"audio", "payload":{"is_reusable":true}}}' -F '[email protected];type=audio/mp3' "https://graph.facebook.com/v21.0/me/messages?access_token=<secret>"

Any help is highly apreciated :slight_smile:

Share the output returned by the last node

File Extension:
mpga
Mime Type:
audio/mp3
File Size:
114 kB

Information on your n8n setup

  • n8n version: 1.67.1
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu

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:

Hi @Andrei_Ignat

Can you share an example of what the input is that goes into your Facebook HTTP request?

Tip for sharing your workflow in the forum

Pasting your n8n workflow


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>
```

Make sure that you’ve removed any sensitive information from your workflow and include dummy data or pinned data as much as you can!


You could probably use a Split Out Node or Loop node to provide a single file per request as the Error from Facebook API suggests.

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