Flow Details
A very simple n8n workflow that gets the number of 'processing' orders from your WooCommerce store in 5 minute increments using the REST API and displays them on your AWTRIX display.
There is additional functionality in the app with a true/false trigger. If the number of orders that it pulls in equals zero, then it will remove the app from displaying on the AWTRIX pixel clock. If the number of orders is not zero, it will show the number orders in the format "{# of processing orders} new" — feel free to adjust this as you wish.
Step 1: WooCommerce Credentials
This uses n8n's built-in WooCommerce authorization, so simply create app credentials in your WordPress Dashboard under WooCommerce > Settings > Advanced > REST API then add those credentials to n8n.
Additional credentials details: For the app credentials, ensure that your user is an Administrator or Shop Manager, and that you give it Read/Write permissions. Copy the Consumer Key and the Consumer Secret and add it to your Credentials in n8n. The credentials tab is on the left. Click into it and hit "Add Credential." On top of the Key & Secret, you will need to add your store URL, and ensure that "Include Credentials in Query" is ticked to the on position.
Step 2: Changes in n8n Specific to your Website
Once you do that, make sure that in this n8n workflow, you go to the "Get Processing Order Data" and change them to your own credentials. At the same time, you will see this under URL "https://yourstoreaddresshere.com/wp-json/wc/v3/orders" — ensure you change the domain in the string to your own.
For the final n8n step, make sure to go the "Send to Clock" and "Remove from Clock" steps and make sure that the URL is accurately set to the local IP address of your clock.
Make sure to save and Activate the workflow.
Step 3: Adding the Icon to Your Clock
Lastly, go to the IP address of your clock in your browser, hit the 'Icons' tab, and paste in "3039" (without quotation marks) under Lametric Icon ID, and hit Download.
Customizations
Alternative Icon Choices
If you want to see or use alternative Lametric Icons, you can go to https://developer.lametric.com/icons and find one that you like or create your own. Once you do either of these things you can go into the flow, go to "Send to Clock" and change the ID of the Icon under Body Parameters > Icon (name) > Value
Time Between Data Updates
You can adjust the time between triggers by selecting the first step of the Workflow named "Every 5 Minutes" and change the "Minutes Between Triggers" value. Please remember that the more often that you trigger this, the more taxing this becomes on your WordPress server.
Always Display the Number of Pending Orders (Even if Zero)
If you'd like to do this, simply delete the IF node of the n8n sequence and reconnect "Parse Code" to "Send to Clock." If you do this, I recommend keeping "Remove from Clock" and disconnected from all other nodes if you'd ever like to deactivate the Workflow and manually remove the app from your clock. Alternatively, you can remove the app from your clock by deactivating the n8n workflow and rebooting your clock by accessing http://[Clock IP]/api/reboot from your browser.