Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
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.

  • adilei Profile Picture
    on at
    Re: Issue with Chatbot Automatically Reprompting Without User Response After Image Upload

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

  • NicolasGeolives Profile Picture
    14 on at
    Re: Issue with Chatbot Automatically Reprompting Without User Response After Image Upload

    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
    Re: Issue with Chatbot Automatically Reprompting Without User Response After Image Upload

    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?

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

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 > Copilot Studio - General

#1
Pablo Roldan Profile Picture

Pablo Roldan 27

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 25

#3
stampcoin Profile Picture

stampcoin 10

Overall leaderboard