Error when creating HTTP Request cURL import

I’m trying to import this curl from MessageBird and it is giving me an error from console. Running n8n.io - Workflow Automation

Running n8n via N8N Cloud

curl -X "POST" "https://api.bird.com/workspaces/2bf55680-c27e-478a-8547-9cacd9940926/channels/c18bbf86-c90a-46ff-959e-518378100ddc/messages" \
     -H 'Authorization: AccessKey abcd' \
     -H 'Content-Type: application/json' \
     -d $'{
  "receiver": {
    "contacts": [
      {
        "identifierKey": "emailaddress",
        "identifierValue": "<YOUR_EMAIL_ADDRESS>"
      }
    ]
  },
  "body": {
    "type": "html",
    "html": {
      "text": "<YOUR_EMAIL_MESSAGE>",
      "metadata": {
        "subject": "Get started with Email Api"
      }
    }
  }
}'

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:

@Albert_Wong , you need to remove the $ from value of -d in -d $'{. That is, try to import this

curl -X "POST" "https://api.bird.com/workspaces/2bf55680-c27e-478a-8547-9cacd9940926/channels/c18bbf86-c90a-46ff-959e-518378100ddc/messages" \
     -H 'Authorization: AccessKey abcd' \
     -H 'Content-Type: application/json' \
     -d '{
  "receiver": {
    "contacts": [
      {
        "identifierKey": "emailaddress",
        "identifierValue": "<YOUR_EMAIL_ADDRESS>"
      }
    ]
  },
  "body": {
    "type": "html",
    "html": {
      "text": "<YOUR_EMAIL_MESSAGE>",
      "metadata": {
        "subject": "Get started with Email Api"
      }
    }
  }
}'
2 Likes

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