I’m having trouble figuring out how to add multiple tags when creating a page using the Notion API. I’ve got single tags working fine, but multiple tags are giving me headaches.
I encountered a similar issue when working with the Notion API. The key is to structure the ‘multi_select’ property correctly. Here’s what worked for me:
This format should resolve your validation error. Remember, the tag names must exactly match existing tags in your database. Also, ensure you’re using the correct API version and have the necessary permissions set up. If you’re still facing issues, double-check your API token and database ID.
I’ve wrestled with this issue before, and I can share what worked for me. The problem lies in how you’re structuring the ‘multi_select’ property. Instead of using ‘options’, you need to use an array of objects directly. Here’s the corrected version:
Notice that we removed ‘options’ and directly provided an array of tag objects. Also, you don’t need to specify the color in the API call - Notion will use the predefined colors for these tags if they already exist in your database.
This structure should work for adding multiple tags. Just make sure the tag names match exactly with existing tags in your Notion database. If you’re still running into issues, double-check your API permissions and make sure you’re using the latest version of the Notion API.