Skip to main content

How to create a unique ID for each asset

Have Dash automatically give assets a unique number using Zapier

All Dash assets have their own unique identifier (known as an asset ID), which you can see as the last string of text in the URL bar when viewing an asset, e.g. 75d7fd23-a842-4f98-adf1-13d127c0e3bf.

This isn't the most user-friendly format though, and so for some cases you might like to be able to have an easier to refer to number, allowing you to refer to specific assets with your colleagues, even if you aren't in Dash. E.g. "we're going to use asset 3452 for the header image in this campaign".

To do this, you need to use a 3rd party automations tool called Zapier.

How Zapier manages your custom asset number

Here's how it works at a high level:

  1. Zapier constantly scans for new uploads into your Dash

  2. You upload a new asset into Dash

  3. Zapier looks up the last asset number that was used

  4. Zapier increments this by 1 and applies it to a custom field in your asset

Done!

Setting up Zapier to apply your asset number automatically

As the Zapier interface often changes with new functionality, we can't document every single step, so we'll lay out the core things you need to do:

Before you begin

Before you start, do the following:

The structure of your zap

Step 1 - the trigger

The trigger should be "New asset" using the Dash Zapier app, and doesn't require any additional configuration

Step 2 - loop

The loop ensures that Zapier processes each asset in an upload.

Add a step after the trigger step, and choose "Looping"

  • In the Setup tab, choose "Create loop from line items" in the Action Event dropdown

  • In the Configure step, give the item a name, then choose the "ID" field from Dash in the second box

Step 3 - Storage

For step 3, add a "Storage" step. This will be the step that handles the incrementing logic.

  • In the Setup tab, choose "Increment value" for Action Event

  • In the Configure step, give it a name and enter the increment amount

Step 4 - action

The final step is the action - the action that is taken on your Dash asset

  • In the Setup tab, chose the action "Update Asset Metadata"

  • In the Configure step, choose the "ID" field for the asset ID, choose your custom field in Dash for the field to increment, and choose the output value from the storage step for the field value

Your zap should now look like this, and you can publish it:

The next time you upload an asset into Dash, your custom field should be populated with an incrementally-increasing number πŸŽ‰

Things to note

  • Zaps run at different frequencies depending on various criteria. Check the zap details to learn how often your zap will run. You can also manually run a zap from within the zap page for testing purposes.

  • There may be limits to how often this can run - this will depend on your plan and possibly limits within the steps themselves - we haven't tested this 'at scale', i.e. if you imported 10,000 assets!

Did this answer your question?