n8n Trigger#
The n8n Trigger node gets triggered when the n8n instance is started or restarted. The n8n Trigger node can be used to notify when the n8n instance starts.
Node Reference#
- Events
- Instance started: Triggers when the n8n instance is started or restarted
Example Usage#
This workflow allows you to receive a message on Mattermost when your n8n instance starts. You can also find the workflow on n8n.io. This example usage workflow uses the following nodes. - n8n Trigger - Mattermost
The final workflow should look like the following image.
1. n8n Trigger node#
The n8n Trigger node will trigger the workflow whenever n8n starts.
- Select 'Instance started' from the Events dropdown list.
In the screenshot below, you will notice that the node triggers the workflow when the n8n instance starts.
2. Mattermost node (post: message)#
This node will send a message in the workflow
channel on Mattermost.
- First of all, you'll have to enter credentials for the Mattermost node. You can find out how to enter credentials for this node here.
- Select a channel from the Channel ID dropdown list.
-
Click on the gears icon next to the Message field click on Add Expression.
-
Enter the following message in the Expression field:
Your n8n instance started at {{$json["timestamp"]}}.
. - Click on Execute Node to run the workflow.
In the screenshot below, you will notice that the node sends a message to Mattermost.
Activate workflow for production
This example workflow uses the n8n Trigger node, which is a Trigger node. 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.