Custom Notion node failing due to lack of notion API key

Edit: I found another forum post where @Wasay-Gumloop mention’s that this is a limitation, and the Notion secret key needs to passed in as an input for the custom node (is that right?)

I’m trying to create a custom node to extract specific properties from a record in a Notion database.

The error I’m getting from Gummie is:

"> It looks like the Notion Database Search node couldn’t run because

it’s missing a required secret key. The node needs a Notion API key
to connect to your Notion account, but this key hasn’t been added to
your Gumloop workspace secrets yet.

To use this node, you’ll need to add your Notion API key to your
workspace. This is a security measure to safely connect Gumloop
with your Notion account.

Would you like help with adding your Notion API key to your
Gumloop workspace secrets?"

Full error log:

Notion Database Search Failed!
Command exited with code 1 and error:
Traceback (most recent call last):
  File "/index.py", line 133, in <module>
    print('___FUNCTION_OUTPUT___\n' + str(main('A-commerce', {'Database ID': '1b30f7b3c16b806b89fdcfbd25885486', 'Search Property': 'Engagement name', 'Output Properties': 'Workshop Address'})))
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File “/index.py”, line 16, in main
raise ValueError(
ValueError: Missing notion_api_key secret. Please add it to your Gumloop workspace secrets.

I checked my credentials page and reauthenticated Notion, but no luck

Hey @samhbarton! If you’re reporting an issue with a flow or an error in a run, please include the run link and make sure it’s shareable so we can take a look.

  1. Find your run link on the history page. Format: https://www.gumloop.com/pipeline?run_id={{your_run_id}}&workbook_id={{workbook_id}}

  2. Make it shareable by clicking “Share” → ‘Anyone with the link can view’ in the top-left corner of the flow screen.
    GIF guide

  3. Provide details about the issue—more context helps us troubleshoot faster.

You can find your run history here: https://www.gumloop.com/history

Hey @samhbarton – Yes that is right. A custom node is an independent python script hence any tool or software being invoked would need to be accessed via the API. You can add the API key directly within the code and it remains safe since custom node’s code can only be viewed/edited by the owner of the node.

That said, a better way to create a customized Notion node would be using the MCP feature, it directly connects with you credential and has built-in tools. We have the server for Notion ready but want to test and make sure its up to par.

OK sounds good. Looking forward to taking it for a spin!

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