Sapo Trigger
Last updated
Last updated
Sapo Trigger on the N8N platform - a powerful workflow automation tool that allows you to create and automate complex workflows with ease. With Sapo Trigger, you have the ability to monitor and react to events and data from Sapo, a popular e-commerce management system. Sapo trigger allows you to create complex automated processes to interact with data from the Sapo system and make your business more efficient and save time.
Delete Customer
Delete Order
Delete Product
New Cancelled Order
New Customer
New Fulfilled Order
New Order
New Paid Order
New Partially Fulfilled Order
New Product
Update Customer
Update Order
Update Product
This workflow allows you to receive updates when a new product gets added in Sapo Store 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.
Sapo Authentication
Sapo Trigger
Edit Fields (Set)
Sapo
The final workflow should look like the following image.
Select Create new credential at Credential to connect with field.
Provide your Store Name and Access Token (note: Access Token is the result of the Sapo Authentication node). After that, you can click save to finish creating credentials.
Select 'New Product' from the Events dropdown list, then you only save the workflow, it will automatically register the webhook corresponding to that event.
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 Sapo Store. 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.id}}
.
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.name}}
.
Select 'Selected Input Fields' from the Include in Output dropdown list. 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 Sapo Store
First of all, you'll have to enter credentials for the Sapo node consisting of Store Name and Access Token (taken from Sapo Authentication) then click Save button.
Select 'Lấy một Product' from the Operation dropdown list.
Enter the Product ID in the Product ID 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.
This node is used to obtain access tokens for Sapo's nodes. This node is used to obtain access tokens for Sapo's nodes. How to prepare and use this node .