pipedream icon indicating copy to clipboard operation
pipedream copied to clipboard

[BUG] property.map.value is not a function, when pushing data to notion database.

Open gizmofalcon opened this issue 3 years ago • 4 comments

I'm facing an issue here where the UI shows the properties selected, I can fill the value for each property,

image

but it errors out after running saying property.map.value is not a function.

And in the "inputs" section of the request, I see that the property field is empty.

image
TypeError
property.value.map is not a function

DETAILS
    at Object.convertToNotion (file:///tmp/__pdg__/dist/code/4e0eaa7dbadfe9d398cc7f7ffbc8570f4bcf3770bd7362e8184bd6accc62cd9c/code/common/notion-page-properties.mjs:52:36)
    at Object._convertPropertiesToNotion (file:///tmp/__pdg__/dist/code/4e0eaa7dbadfe9d398cc7f7ffbc8570f4bcf3770bd7362e8184bd6accc62cd9c/code/actions/common/base-page-builder.mjs:98:60)
    at Object._buildNotionPageProperties (file:///tmp/__pdg__/dist/code/4e0eaa7dbadfe9d398cc7f7ffbc8570f4bcf3770bd7362e8184bd6accc62cd9c/code/actions/common/base-page-builder.mjs:128:19)
    at Object.buildPageProperties (file:///tmp/__pdg__/dist/code/4e0eaa7dbadfe9d398cc7f7ffbc8570f4bcf3770bd7362e8184bd6accc62cd9c/code/actions/common/base-page-builder.mjs:155:19)
    at Object.buildPage (file:///tmp/__pdg__/dist/code/4e0eaa7dbadfe9d398cc7f7ffbc8570f4bcf3770bd7362e8184bd6accc62cd9c/code/actions/create-page-from-database/create-page-from-database.mjs:62:31)
    at Object.run (file:///tmp/__pdg__/dist/code/4e0eaa7dbadfe9d398cc7f7ffbc8570f4bcf3770bd7362e8184bd6accc62cd9c/code/actions/create-page-from-database/create-page-from-database.mjs:73:23)
    at process.processTicksAndRejections (internal/process/task_queues.js:95:5)
    at global.executeComponent (/var/task/launch_worker.js:142:22)
    at MessagePort.messageHandler (/var/task/launch_worker.js:614:28)

gizmofalcon avatar Sep 02 '22 00:09 gizmofalcon

Hey @GiZmoFalcon, can you try inputting [ "test" ] for the prop tags?

andrewjschuang avatar Sep 02 '22 02:09 andrewjschuang

@GiZmoFalcon @GiZmoFalcon First TestCase for running this action in a simple way and selecting tags from already provided values it seems to be working fine for me image image image

ghost avatar Sep 03 '22 14:09 ghost

@andrewjschuang @GiZmoFalcon Second TestCase: iam inserting Tags as Andrew described ["Test"] as custom value but it didn’t work for me. image image image

Conclusion: As i have noticed by going to notion website and i was able to update the Tags it should also accept the custom tags that we are providing in the action

ghost avatar Sep 03 '22 14:09 ghost

It seems that the multi select will always look for an array, so for any variable using previous runs need to be wrapped in array inside the quotations, which is not really obvious, but works.

Screen Shot 2022-09-07 at 10 43 02 AM

kyeshmz avatar Sep 07 '22 01:09 kyeshmz

Test Passed works fine now image image

ghost avatar Oct 05 '22 19:10 ghost