NhanhVN Trigger
Last updated
Last updated
NhanhVN Trigger on the N8N platform - a powerful workflow automation tool that allows you to create and automate complex workflows with ease. NhanhVN Trigger allows you to integrate your Nhanh.vn application with other services and applications, creating automated workflows without writing code.
Create Order
Create Product
Delete Order
Delete Product
Inventory Change
Update Order
Update Product
This workflow allows you to receive updates when a new product gets added in Nhanh.vn and use their information to find the product. You can also find the workflow on n8n.io. This example usage workflow would use the following node.
Nhanhvn Trigger
Set
nhanhvn
The final workflow should look like the following image.
The Nhanhvn Trigger node will trigger the workflow when a new product gets added in Nhanh.vn.
Enable webhooks for your app
2.1 If you don't have an app yet, click "Thêm mới" button to create an app
2.2 If you already have an app, click on the application name to go to the detail page. Click edit application, and scroll down to webhooks section:
Check "Bật webhooks".
Fill in Webhooks callback URL (must run https and response http code = 200).
Fill in Webhooks verify token (this value is filled in by you. Nhanh API will include the webhooksVerifyToken when firing webhooks so you can verify the data is from Nhanh API firing).
Select the events you want to register to receive webhooks and click Save.
Select 'Create Product' from the Events dropdown list.
Click on Execute Node to run the node.
In the screenshot below, you will notice that the node returns the information of the new product that was added to Nhanh.vn. This output gets passed on to the next node in the workflow.
We will use the Set node to ensure that only the data that we set in this node gets passed on to the next nodes in the workflow.
Click on Add Value and select 'Number' from the dropdown list.
Enter Product ID
in the Name field.
Click on the gears icon next to the Value field and click on Add Expression.
Select the following in the Variable Selector section: Current Node > Input Data > JSON > data > productId. You can also add the following expression: {{$json.data.productId}}
.
Click on Add Value and select 'String' from the dropdown list.
Enter Product Name
in the Name field.
Click on the gears icon next to the Value field and click on Add Expression.
Select the following in the Variable Selector section: Current Node > Input Data > JSON > data > name. You can also add the following expression: {{$json.data.name}}
.
Toggle Keep Only Set to true
. We set this option to true to ensure that only the data that we have set in this node gets passed on to the next nodes in the workflow.
Click on Execute Node to run the node.
In the screenshot below, you will notice that the node uses the data from the previous node and returns the data that we set for the workflow.
This node will use the data coming from the previous node to find product in nhanh.vn
Select 'Find Product' from the Operation dropdown list.
In n8n, paste the Access token in the Authentication Token field.
Enter the product name in the Product Name name field.
Click on Execute Node to run the node.
In the screenshot below, you will notice that the node finds the information of a new product by the product name value of the previous node.
First of all, you'll have to go to
You'll have to enter a path that you want to receive an event. Then you will copy Webhook URLs and enter this link into "Webhooks callback URL" field of your app in the step above. You can find out how to do that .
First of all, you'll have to enter credentials for the Nhanh VN node consisting of Business ID and App ID. You can find out how to have that .
Enter the Access token in the Authentication Token field. You can find out how to get that .