Notion Trigger
Notion is an all-in-one workspace for your notes, tasks, wikis, and databases.
!!! note "Credentials" You can find authentication information for this node here.
Example Usage
1. Notion Trigger node
The Notion Trigger node will trigger the workflow when new data gets added to Notion.
- First of all, you'll have to enter credentials for the Notion Trigger node. You can find out how to do that here.
- Click on Add Poll Time and select 'Every Hour' from the Mode dropdown list. This will check Notion every hour for new meeting notes.
- Select 'Page Added to Database' from the Event dropdown list.
- Select the database that contains the meeting notes from the Database dropdown list.
- Click on Execute Node to run the node.
Note: Make sure to add a field with the Created Time
property type in your Notion database.
2. IF node
This node will check if the notes belong to the Marketing
team. If the team is Marketing
the node will return true
, otherwise false
.
- Click on Add Condition and select 'String'.
- Click on the gears icon next to the Value 1 field and click on Add Expression.
- Select the following in the Variable Selector section: Current Node > Input Data > JSON > properties > Team. You can also add the following expression:
{{$json["properties"]["Team"]}}
. - Enter
Marketing
in the Value 2 field. - Click on Execute Node to run the node.
3. Mattermost node (post: message)
This node will send a message about the new data in the channel 'Marketing' in Mattermost. If you have a different channel, use that instead.
First of all, you'll have to enter credentials for the Mattermost node. You can find out how to do that here.
Select a channel from the Channel ID dropdown list.
Click on the gears icon next to the Message field and click on Add Expression.
Enter the following message in the Expression field:
New meeting notes got added.
Agenda: {{$json["properties"]["Agenda"]["content"]}}
Date: {{$json["properties"]["created time"]}}
- Click on Execute Node to run the node.
5. NoOp node
Adding this node here is optional, as the absence of this node won't make a difference to the functioning of the workflow.
- Create a NoOp node connected to the 'false' output of the IF node.
- Click on Execute Node to run the node.
!!! note "Activate workflow for production" You'll need to save the workflow and then click on the Activate toggle on the top right of the screen to activate the workflow. Your workflow will then be triggered as specified by the settings in the Notion Trigger node.