Help with creating action in pipedream

Hi all,

I’m struggling to make an action with pipedream that has multiple props (to create a dropdown option).

Here is my gist for the code:

When I attempt to publish I see this on the console:

pd publish generateLuluAuthToken.js
component create api call responded with status: 400, body: {“error”:"{“name”:“UserError”,“message”:“unsupported array element type for prop api_type: object”}"}

Can you see the issue with my code?

I’m following this tutorial:

Thank you!

Anthony

Hi Anthony,

Thanks for the code sample, makes it so much easier to follow along!

I believe only the object[] prop type is compatible with that array of options.

Take a look at the User Interface section of the docs. Does switching those to that type fix the issue?

@pierce thanks for your help. I just figured that out on my own haha but there is still an error.

Here is what it looks like now:

The error message is different now:

pd publish generateLuluAuthToken.js
component create api call responded with status: 400, body: {"error":"{\"name\":\"UserError\",\"message\":\"unsupported array element type for prop api_type: object\"}"}

oops, the original error before I added the [] to “options” was actually:

component create api call responded with status: 400, body: {"error":"{\"name\":\"UserError\",\"message\":\"options not supported for prop api_type\"}"}

After alot of trial and error, I found that I had to set the type to “string” and then the options array worked! So there seems to be an issue with the docs.

I discovered this by looking through the github repo of all the other components / actions that have been written by the community / staff.

Kind regards,

Anthony

1 Like

Hi @whiteknightdigital

Awesome! Sorry I thought your intention was to create an object field, not a single string field. That’s correct.

We’re doing a whole Component Development Course on Pipedream University and overhaul those docs while we’re at it. Thanks for pointing that out!