Skip to main content

Notifications

Community site session details

Community site session details

Session Id : /qjOx5dcHzN93pDvmhgzLC
Power Automate - AI Builder
Answered

Using power automate to tag images uploaded into sharepoint using AI builder models

Like (0) ShareShare
ReportReport
Posted on 31 Aug 2022 10:31:20 by 45

Hello everyone

 

I already have the AI builder models. And need to build a flow that tags images uploaded into sharepoint using the models.

AI builder models categorize images. The labels are ones such as "outdoor or indoor", "with cables or without cables", "empty room or not empty room" etc.

 

Flow testing shows that the models really do predict the tags. Uploaded room full of stuff and got correctly predicted as "not empty room".

Teflonreis_0-1661938046343.png

Teflonreis_1-1661938137227.png

 

Finally, I want to add an "not empty room" tag to the image on sharepoint. And find the image using the sharepoint search bar like microsoft is already doing here .

Have not found anything related to that yet. Hope you can help me at this point. 

 

Many thanks kind regards

 

Categories:
  • Teflonreis Profile Picture
    45 on 02 Sep 2022 at 14:32:44
    Re: Using power automate to tag images uploaded into sharepoint using AI builder models

    thanks Antrod

     

    Will do that. 

  • Antrod Profile Picture
    Moderator on 02 Sep 2022 at 14:25:54
    Re: Using power automate to tag images uploaded into sharepoint using AI builder models

    If you manage to create the flow that can create the tag automatically I guess that makes sense but I don't know if that's possible, you can give it a try 🙂

     

    If you are struggling creating that image tag, you can try to ask the question in the "Building flow" section, some flow experts may help you Building Flows - Power Platform Community (microsoft.com)

     

    Let us know how your automation journey is going, I'm curious to see your scenario up and running 🙂

  • Teflonreis Profile Picture
    45 on 02 Sep 2022 at 14:16:17
    Re: Using power automate to tag images uploaded into sharepoint using AI builder models

    Hi @Antrod

     

    If I want to scale it up for - say 1000 images - I could make the following flows?

    1. flow that creates the tag manually

    2. throwaway flow to get the defined value in sharepoint "funny format"

    3. update items flow where I replace 

    "Value""not empty room|4c289689-cce2-4fd1-b40d-dc962a685fc9"

    Teflonreis_0-1662128007368.png

     

    replace with

    Teflonreis_1-1662128075043.png

     

    Does it make sense for 100plus images?

    I am inclined to give up on this image library ins sharepoint idea where each uploaded image gets tagged automatically. 

     

    Thanks for your help and answers 🙂

  • Antrod Profile Picture
    Moderator on 02 Sep 2022 at 14:06:04
    Re: Using power automate to tag images uploaded into sharepoint using AI builder models

    Hi @Teflonreis ,

     

    Indeed if you try to add a string in the image tags it won't word because it's not recognized by SharePoint. You need to first create your tag manually in your SharePoint library, then create a throwaway flow just to see how SharePoint defined the value for it (See second bullet point in my previous answer) and then you get the name that you value that you will be able to use. 

     

    In my case I created in SharePoint the tag "Not empty room" and SharePoint created a value called "Not empty room|a08c1622-..." this is th value you should use in your main flow to file in the image tags in the Update file properties action.

  • Teflonreis Profile Picture
    45 on 02 Sep 2022 at 13:57:34
    Re: Using power automate to tag images uploaded into sharepoint using AI builder models

    Hi @Antrod 

     

    I have a follow up question.

    In your workaround, the "image tags value" in "Update files properties" has an interesting format.

     

    In my flow, I tried not adding any tags to my images manually, but with the following flow.

    Teflonreis_2-1662126845155.png

    The format and output of the AI builder predict action should be a simple string

    Teflonreis_5-1662127179306.png

     

    Teflonreis_6-1662127189913.png

     

    The prediction is "no cabling and trays". Inserted it into Update files properties "Image tags" but gives me a formatting error.

     

    But received the error 

    "The data returned from the tagging UI was not formatted correctly\r\nclientRequestId: a6e2b693-639d-40b1-aef0-c20d13cd3769\r\nserviceRequestId: a6e2b693-639d-40b1-aef0-c20d13cd3769"
    Teflonreis_0-1662126571674.png

     

    Do you have any suggestions?

    Thank you so much for the support.

  • Teflonreis Profile Picture
    45 on 31 Aug 2022 at 12:06:54
    Re: Using power automate to tag images uploaded into sharepoint using AI builder models

    Thanks a lot. Will get back to it with help of your suggestions 😄

  • Antrod Profile Picture
    Moderator on 31 Aug 2022 at 12:03:09
    Re: Using power automate to tag images uploaded into sharepoint using AI builder models

    It should be possible yes, Power Automate is broadly used to process batches of data.

     

    But the best thing is to try it 🙂 You can use the trigger detecting that a file is created in your SharePoint folder and for each file run the AI Builder model and the update file properties.

     

    Let us know if you have more questions!

  • Teflonreis Profile Picture
    45 on 31 Aug 2022 at 11:54:16
    Re: Using power automate to tag images uploaded into sharepoint using AI builder models

    Hello @Antrod 

     

    Thanks for the quick response. Very interesting approach to update file properties in flow!

    In the question I am talking about a single image. In real life, I am thinking of hundreds of images and 10 tags per image. From your experience, is it feasable for me in power automate?
    Want to automate the tagging process so far that when somebody adds an image, it gets tagged automatically. And I can search it using the search bar.

     

     

  • Verified answer
    Antrod Profile Picture
    Moderator on 31 Aug 2022 at 11:35:52
    Re: Using power automate to tag images uploaded into sharepoint using AI builder models

    Hi @Teflonreis ,

     

    Thanks for reaching out, very interesting scenario! It's indeed not easy to find how to update image tags in SharePoint from Power Automate. I managed to do it with a little trick:

    • Go to your SharePoint library, add manually the tag you want to include in the image tags columns, for example "Not empty room":

    Antrod_0-1661945414222.png

     

    • Run a flow to get the tag value that actually identifies the tag

    Antrod_1-1661945463549.png

    Antrod_4-1661945862516.png

     

    • Then use this value when you need to update file properties in your flow:

    Antrod_3-1661945661089.png

     

    Hope that helps!

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started