Folders on NAS to entities in Fibery, with relation to customer entity

Thought I’d share this little use-case, mostly so maybe new people can see the things you can do with Fibery.

This isn’t a tutorial—I’m just going to glance over it to give you a rough idea of how it works, but can go into depth if anyone wants.

Goal

  • Every time we create a new folder with a customer’s name in our NAS, we want it to appear as a new entity in Fibery.
  • We also want the folder to be associated with a customer (an entity) in Fibery, which can be achieved through the relations.
  • We don’t want to spend time manually assigning Folder → Customer relationship.

Setup

On our end

On our NAS server we create a folder for each customer named by their ID, underscore, and then short format of date (as they can be recurring): 1234_031120, 1235_031120, and so on. The customers ID is automatically created by our accounting platform, which is a webapp.

Through the power of their API, Fibery’s API, and a NodeJS program, we’ve also fully automated importing the customers from accounting in to Fibery.

In Fibery

Each folder means a serie of things we need to do, so I made the folder its own entity and added the State extension for progress (sorry, it’s in Norwegian):

The name of the entities are the names of the folders. Next I created a formula field for folder entities that uses Regex to get the customer ID part. Finally, I created a one-to-many relationship from folder to customers, and with the power of the auto-linking relationship I could have it target my formula field to the Customer ID field of customers.

I took the Regex in the formula from the announcement. Very convenient indeed :slight_smile:

The result

All entities and relations are fully automated. Blue entities are folders, and the linked purple are the customers.

Entities show up max 5 minutes after creation. By adding a some caching/storing on our end, I also don’t make any unnecessary API requests.

I also made it so the network paths are included inside each entity, so you only have to copy-paste to go in to the folder.

2 Likes

Awesome work!
It obviously took a bit of work to set up, but sounds like it will save a lot of time for your team :+1:

I’m not a NodeJS expert, so am wondering where the script runs (on the NAS? a cloud service?..)?
Do you think that it would be possible to achieve this entirely from within Fibery if/when they establish automations as a feature?

FWIW I had previously wondered about achieving something vaguely similar (syncing/backing up Fibery entities to a Cloud service (Onedrive, Dropbox, etc)) but I decided it might be best to wait and see what features they add before spending time on rolling my own.

I had already made the checker and notification system as I used it for sending MS Teams notifications. In addition I had already played around with making a user-friendly client for Fibery that I could use.

This made it relatively easy to implement:

But yes, overall it has saved us a lot of time, and I am sure it will continue to do so in to the future :slight_smile:

I converted an old work station to something like a local server that does all sort of things. I installed NodeJS on it and have it run 24/7, so it’s local. That said, a lot of modern NAS from companies like Synology have easy-install NodeJS so you can run it on those too.

I am not sure, it depends. If you can create scheduled executions that can execute same way buttons can, then yes. This could also be possible already with buttons to trigger manual pull.

I might make that in the future, we’ll see—but not sure about OneDrive. Anything involving Microsoft’s API’s are in my opinion ridiculously hard to understand, debug, and make it work. Thankfully for MS Teams someone made a simple Webhook app that give you an URL you make POST requests to.

1 Like