Learning Timeline
Key Insights
Hack: Grabbing IDs for Testing
During the setup phase, you can 'copy' the ID from the 'Get Tasks' output and manually 'paste' it into the Update tool to test the connection before switching it to 'From AI' mode.
AI Accuracy Tips
Always provide clear descriptions for every field using the 'Sparkles' icon. The more detailed your instructions are in the description, the fewer errors the AI will make when determining dates or statuses.
Step by Step
Configuring the 'Get Tasks' Tool (Read Database)
- Click the '+' button on the n8n canvas and search for the 'Notion' tool.
- Connect your Notion account using the provided instruction link if you haven't done so already.
- Rename the tool to 'get tasks'.
- Change 'Resource' from 'Page' to 'Database Page'.
- Search for and select your task database (e.g., 'tasks database') from the list.
- Set 'Operation' to 'Get Many'.
- Set 'Limit' to 50.
- Under 'Filters', select 'Build Manually' and set 'All filters must match'.
- Add a 'Condition' where the 'Completed' status is 'False' (to fetch incomplete tasks).
- Click 'Execute Step' to verify that data is successfully pulled from Notion.
Configuring the 'Update Task' Tool (Update Database)
- Duplicate the previous Notion tool and connect it to the AI Agent.
- Rename the tool to 'update a task'.
- Set 'Operation' to 'Update'.
- Click the 'Sparkles' icon (expression) in the 'Database Page ID' section and enter the 'From AI' formula so the AI can automatically identify the task ID.
- In the 'Properties' section, select 'Status'.
- Switch the 'Status' input to 'Expression' mode and enter the 'From AI' formula snippet to provide status options (Backlog, Open, Done) for the AI.
- Add the 'Due Date' property and untick 'Include Time'.
- Click the 'Sparkles' icon on 'Due Date' and enter an instruction description to help the AI determine the appropriate date.
Configuring the 'Create Task' Tool (Create Database)
- Duplicate the Notion tool once more and connect it to the AI Agent.
- Rename the tool to 'create a task'.
- Set 'Operation' to 'Create'.
- Select the same database ('tasks database').
- Click the 'Sparkles' icon in the 'Title' section so the AI can generate its own task title.
- Add the 'Assigned To' property and select your name (hardcoded) if this is for personal use.
- Add the 'Due Date' property, disable 'Include Time', and set the 'Timezone' (e.g., Asia/Kuala_Lumpur).
- Click the 'Sparkles' icon on 'Due Date' to allow the AI to set the date via an expression.
- Add the 'Status' property, change it to 'Expression', and enter the 'From AI' formula for the status logic (Open or Backlog).