Zapier / Invalid Argument Users.Email?

  • 1
  • Problem
  • Updated 12 months ago
I'm using Zapier to create users and am randomly getting the following error: 

Javascript Exception: `TypeError: Cannot read property '0' of undefined`.

Which is why I decided to make my own connector but am stuck with error messages that I can't figure out: "Invalid Argument Users.Email" or "Invalid Argument Users.User"

This is the Postman request:
POST /sf/v3/Users HTTP/1.1
Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
Postman-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Photo of Patrick Prasquier

Patrick Prasquier

  • 2 Posts
  • 1 Reply Like

Posted 12 months ago

  • 1
Photo of Michael Berrier

Michael Berrier, Software Engineer

  • 123 Posts
  • 24 Reply Likes

The V3 API expects a JSON-encoded request body, so I would expect your request to have the following header:
Content-Type: application/json

And a body like the following:
  "Email" : "",
  "FirstName" : "Name",
  "LastName" : "Last Name",
  "Company" : "Company",
  "Password" : "password"

See the documentation here for a more full-fledged example:

As written, you're using a form-urlencoded request instead.

Photo of Patrick Prasquier

Patrick Prasquier

  • 2 Posts
  • 1 Reply Like
Thanks. Switching to application/json  in Postman and checking the option "Send to Action Endpoint URL in JSON body" in Zapier both did the trick.