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 / Issue with Chatbot Aut...
Copilot Studio
Unanswered

Issue with Chatbot Automatically Reprompting Without User Response After Image Upload

(0) ShareShare
ReportReport
Posted on by 14

Hello,

I'm working on a chatbot with Microsoft Copilot Studio, where I've encountered an issue after a user uploads an image. The chatbot is supposed to ask a question following the image upload, but instead of waiting for the user's response, it immediately reprompts. Here's a brief overview of my setup:


• I have a JavaScript client that capture the event of an upload image.
• I treat the file and return the image name, a blob URL for showing the sended image and the image in base 64.
• I use an event for communicating with my chatbot.

 

function initializeStore() {
 return createStore({}, ({dispatch}) => next => async action => {
 const {type, payload} = action
 if (type === 'DIRECT_LINE/CONNECT_FULFILLED') {
 await sendStartConversation(dispatch)

 } else if (type === 'WEB_CHAT/SEND_FILES') {
 for(const image of payload.files) {
 try {
 const imageData = await handleImage(image);
 await sendImageUploadEvent(dispatch, imageData);
 } catch (error) {
 console.error('Error handling image:', error);
 }
 }
 }

 next(action)
 });
}
export async function sendImageUploadEvent(dispatch, image) {
 dispatch({
 type: 'WEB_CHAT/SEND_EVENT',
 payload: {
 name: 'CLIENT/IMAGE_UPLOAD',
 type: 'event',
 value: "image:" + JSON.stringify(image)
 }
 });
}

 

NicolasGeolives_0-1707751236928.png

NicolasGeolives_1-1707751286704.png

 



I've ensured there's no duplication in event handling or state management that might lead to this behavior. I'm seeking insights or suggestions on potential causes for this immediate prompt issue and strategies to resolve it.

Any advice or guidance would be greatly appreciated.

 

Thank you.

Categories:
I have the same question (0)
  • adilei Profile Picture
    on at

    Are you sure WebChat isn't sending events you are not aware of? Maybe try logging any activity processed by your store just to make sure?

  • NicolasGeolives Profile Picture
    14 on at

    Yes, I'm sure, because if I display a message before displaying the question with the image, the message is only displayed once. I've also set up logs in my store, but the event is only sent once.

  • adilei Profile Picture
    on at

    Got it. Maybe try raising an issue here - https://github.com/microsoft/BotFramework-WebChat/issues

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 255 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

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

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard