Skip to content

Create update-image-by-asset-id.gs#2

Open
doylegrant wants to merge 1 commit intogrokability:mainfrom
doylegrant:patch-1
Open

Create update-image-by-asset-id.gs#2
doylegrant wants to merge 1 commit intogrokability:mainfrom
doylegrant:patch-1

Conversation

@doylegrant
Copy link
Copy Markdown

Create new script to update images of assets using image URL's.

Create new script to update images of assets using image URL's.
@snipe
Copy link
Copy Markdown
Member

snipe commented Apr 17, 2024

This would really just be a filename, not a full image URL, no?

@doylegrant
Copy link
Copy Markdown
Author

doylegrant commented Jun 21, 2024

This would really just be a filename, not a full image URL, no?

Sorry for the late response. The image would need to be hosted publicly online somewhere and this will basically bulk upload images for their associated asset id in Snipe-it.

What I did was export my list of assets from Snipe-it by Asset ID and Model Number. Then I had a formula search the model number on Yahoo images and return the link to the first result. Then I ran through the images to make sure the first image result looked correct, otherwise I would manually replace the link. Then on a second tab, I brought over just the Asset Id's and image URL's and ran the script. Script will pull the image, base64 encode, and update the database with the base64 encoded value. Which will be viewable in Snipe-it.

This is roughly how my sheet was set up.
https://docs.google.com/spreadsheets/d/1L9hX2AfDSEk6XpGiaoUNI_hnnTEt_xKhBPSROADZ--M/edit?usp=sharing

Google Docs
Verify Images

Asset Id,Model,Check Image,Link
0001,YZY-00001,https://tse3.mm.bing.net/th?id=OIP.wMpJ6sB7XXCG_lVmQK-CkAHaHa&pid=Api&P=0&w=300&h=300
0002,Lenovo 21HMCTO1WWUS1,<a href="https://sp.yim...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants