web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Handle responses from ...
Copilot Studio
Answered

Handle responses from Power Automate and show the Output message

(0) ShareShare
ReportReport
Posted on by 485

Hello Community,

 

I'm creating a bot to handle the questions for the users to ask about their vacations day's, and I would like to bot can respond if the employee not exists, this is the big picture:

 

- All of the data are maintained into a SharePoint list, they have the Employee number, Available dates, etc.

- The bot can handle the responses from the user and additionally they give them an options to select their requirement

-  If the user prompted an non existing employee number, the bot needs to back with a response

 

Currently I created an Entity to handle (RegexPattern) the way of the user needs to be added the correct way of their employee number, and works well

esjimenezp_0-1697231906597.png

 

but when I submitted and ID number randomly, the bot give me an empty answer, also I added a question to the user to confirm if the ID number is correct, but imagine if the user say yes, they saw the next empty message

esjimenezp_1-1697232138699.png

 

when the ID is found, the next message is show them

esjimenezp_2-1697232233770.png

and I would like to find a way from the Flow or into the PVA to receive and output when the flow not found the ID Number, thanks for all your help.

 

Kind regards 👋

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    I assume you are calling a flow to look up the data in the SharePoint list. When you do the Get Items or the Filter Array to narrow the list and get the data add a condition to check that you found a record. If you didn't then the employee number doesn't exist and you can return a message to that effect instead of the formatted output.

  • esjimenezp Profile Picture
    485 on at

    Thanks @Pstork1 for your response,

     

    Currently I do, I have the Get Items action from Power Automate and is filtering based on the ID Employee

    esjimenezp_0-1697236800768.png

    How can I handle when the ID of the employee not exists and return it to the output of the PVA?

    This is the output.

    esjimenezp_1-1697236991623.png

    This the general overview of my Flow.

    esjimenezp_2-1697237063618.png

    Thanks for your help 🙏

     

    Kind regards 👋

  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    After the Get Items if you do a Condition action on whether the length() of the values array from the Get Items is Greater than 0. If no employee was found then the length of the array will be 0 if its greater than zero then the employee was found. Then I would build a formatted string variable using markdown language to either return the information about the employee or that the employee wasn't found. Then just return that string to the bot. That should simplify the message steps in the bot as well since there will only be one message to display. YOu can read about the markdown language here: Use Markdown language to format Power Automate approvals - Power Automate | Microsoft Learn

  • esjimenezp Profile Picture
    485 on at

    Got it, I added the condition and it works 😎

    ID Employee not exist

    esjimenezp_0-1697415234573.png

     and ID Employee exist

    esjimenezp_1-1697415274609.png

    Now, from the PVA, how can I handle the output? I'm trying to add a condition to confirm the user if their ID number is a correct

    esjimenezp_2-1697415498656.png

     

    but I would like to be more dynamic, for example, if the user typing their employee ID and press enter, the following message I would like to express based on the flow, like:

    "Your Employee ID does not exist" or "Your Employee ID exists: this is the information about your days."

     

    Kind regards 👋

  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    Are you trying to just verify that the employee id exists or do you want to return information from the list if the id exists? I thought it was the latter.  If it is I would just format a string to either tell them that the employee id doesn't exist or return the formatted information. Then have the bot show that text.  If you want the bot to do something different based on those responses you could just have the bot look at the first word of the response and take a different path depending on what is sent back.  

  • Verified answer
    esjimenezp Profile Picture
    485 on at

    Thank you @Pstork1 after doing some research and followed your recommendations I finally configured.

    From the PVA I added the Flow

    esjimenezp_0-1697730021390.png

    Then added a condition to identify if the ID Employee exist 

    esjimenezp_1-1697730134790.png

    An this is the final output 😉, soon I'm going to share the flow via GitHub, stay tune, thanks to all support

    PVAPVA

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 261 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 198 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard