Error Node Request - This command is in an unsupported format

Hello,

I’m using n8n version 0.196.0.

I am creating a new Request node and copying the cURL below but the error message is shown:

Couldn’t import cURL command
This command is in an unsupported format

cURL:

curl --location -g --request POST '{{base_url}}/rest/send/button?id={{session}}' \
--header 'Content-Type: text/html' \
--data-raw '{
    "receiver": "628231xxxxx",
    "buttonMessage":{
        "text":"Hi it'\''s button message",
        "footer":"Hello World",
        "buttons":[
            {
                "buttonId":"id1",
                "buttonText":{
                "displayText":"Button 1"
                },
                "type":1
            },
            {
                "buttonId":"id2",
                "buttonText":{
                "displayText":"Button 2"
                },
                "type":1
            },
            {
                "buttonId":"id3",
                "buttonText":{
                "displayText":"Button 3"
                },
                "type":1
            }
        ],
        "headerType":1
    }
}'

Hi @Geter_Sousa, I’ve just tried this with the current n8n version 0.197.1 and the import works fine for me (though you’d need to provide a valid URL for the request to be sent anywhere):

Recording 2022-10-12 at 13.06.00

Perhaps you could try upgrading to the latest n8n version and re-try this?

Edit: Nevermind, the escaped single quote seems to throw off n8n anyway and the import appears incomplete. Perhaps @RicardoE105 can take a look into this?

Como eu posso intalar a n8n version 0.197.1 desktop? Eu baixo no link Desktop app - n8n Documentation mas foi instalado a versão 0.182.0

Oh, if you’re using the desktop app there’s indeed no update available yet and you’d manually define the request in the HTTP Request node as it has no curl import functionality.

@MutedJam Hey! I’m actually running into a similar issue so I decided to search before posting and came across this thread. I’m running the latest version with the following CURL command and I’m also getting an error:

curl 'https://api.prod.upland.me/api/profile/guybrus4' \
  -H 'authority: api.prod.upland.me' \
  -H 'accept: */*' \
  -H 'accept-language: en-US,en;q=0.7' \
  -H 'appversion: 0.14.339' \
  -H 'authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6ImFjY2VzcyJ9.eyJ1c2VySWQiOiIwZjM0ODAyMC0xNjkxLTExZWItYWZhMi0xOWIwNDgxMTJmNzkiLCJ2YWxpZGF0aW9uVG9rZW4iOiIwZjU1SlY3V2JLUVl6REthQnk2UmVHbTRzQ3hEY3luU2twNGRLYkZ6elpvIiwiaWF0IjoxNjY5ODYxNTM0LCJleHAiOjE3MDE0MTkxMzQsImlzcyI6ImZlYXRoZXJzIiwic3ViIjoiMGYzNDgwMjAtMTY5MS0xMWViLWFmYTItMTliMDQ4MTEyZjc5IiwianRpIjoiMmQwOGNlMWUtOTM4Mi00Yjg3LWI5YjUtOWZhMmE1YjA5OGEyIn0.5F5UzDg1RZ1up36lkA4rgq3FGD5wgrkx2YJbuzjaFeo' \
  -H 'content-type: application/json' \
  -H 'dnt: 1' \
  -H 'origin: https://play.upland.me' \
  -H 'platform: web' \
  -H 'referer: https://play.upland.me/' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-site' \
  -H 'sec-gpc: 1' \
  -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36' \
  --compressed

Hi @TheSmilez, yes, unfortunately the HTTP Request node can’t import all curl commands yet and you might need to specify your HTTP requests manually in these cases. Perhaps @RicardoE105 can take a look at your specific request when he has a minute?

2 Likes

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