Skip to main content

Notifications

Copilot Studio - Calling Actions from Copilot S...
Unanswered

Is it posible to compare username with name in a excel table?

(0) ShareShare
ReportReport
Posted on by 4

Hello,

I'm trying to find an option to compare username to name in an excel cell table.

The idea is to send a schedule based on the username written in excel.

 

Thanks!!

Categories:
  • Expiscornovus Profile Picture
    Expiscornovus 31,144 on at
    Re: Is it posible to compare username with name in a excel table?

    Hi @OscarMir,


    I would actually suggest to use the Table. That is simply easier to work with from a Power Automate point of view. In your example I would use the table name oscar.miro, without the @ and the domain name.

     

    With this approach you could use a split function to retrieve the e-mail and match on the first part of the e-mail, which is oscar.miro.

     

    Below is an example of that approach.

     

    1. The flow setup in Power Automate.

    In the table field of the List rows present in a table action I am using this expression:

     

    split(outputs('Get_user')?['body/mail'], '@')[0]

     

     

    flowsetup_getexcel.png

     

    2. The topic setup in the Power Virtual agent. Over here the bot.UserId is mapped to the UserId field from the flow. I use this to retrieve the users e-mail address to be able to collect the correct table from the Excel file.

     

    getmyexcel_pva.png

  • OscarMir Profile Picture
    OscarMir 4 on at
    Re: Is it posible to compare username with name in a excel table?

    Hi, @

    2021-10-13_15h03_25.png

     

    Cheers,

  • Expiscornovus Profile Picture
    Expiscornovus 31,144 on at
    Re: Is it posible to compare username with name in a excel table?

    Hi @OscarMir,

     

    Just double checking. Do you mean table name a worksheet name? I have tried adding an e-mail address to my table name and it doesn't allow me because of special characters 😁

     

    1. Tried adding dennis@contoso.com as a value in Table name and got the error below.

     

    tablename_error.png

     

    2. So, in the example were would the e-mail address of the user be. At the place were currently Table1 is or Sheet1?

     

    tablename.png

  • OscarMir Profile Picture
    OscarMir 4 on at
    Re: Is it posible to compare username with name in a excel table?

    Hi @

  • Expiscornovus Profile Picture
    Expiscornovus 31,144 on at
    Re: Is it posible to compare username with name in a excel table?

    Hi @OscarMir,

     

    I would say it would be possible if you would use either the bot.UserId or bot.UserDisplayname variables in a Power Automate action (this requires enabling authentication on your bot):

    https://powerusers.microsoft.com/t5/Power-Virtual-Agents-Community/Getting-User-Details-To-Use-In-Power-Virtual-Agents-In-Teams/ba-p/744934

     

    In the Power Automate flow you could use a list rows present in a table action and a filter to retrieve the correct rows for the user.

     

    In what format is the username written down in the Excel table? Can you share a screenshot of the Excel table. Obfuscate the data if needed.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard

Featured topics