Chat trigger has metadata problem with fileupload

I have a problem with chat trigger node. I lost metadata info with using fileUpload. How can I solve my problem?


I use config like this.
createChat({
webhookUrl: API_CONFIG.N8N_CHAT_HOST,
allowedFilesMimeTypes: “application/pdf”,
allowFileUploads: true,
chatInputKey: ‘chatInput’,
webhookConfig: {
method: ‘POST’,
},
target: ‘#n8n-chat’,
mode: ‘window’,
chatSessionKey: ‘sessionId’,
loadPreviousSession: true,
metadata: {siteId: siteId, token: token},
showWelcomeScreen: false,
defaultLanguage: ‘en’,
initialMessages: [
‘Hi there! :waving_hand:
],
});

Hello cagla, Welcome to n8n Community.

I’ve noticed your problem that your metadata is showing [object Object] because you are sending it as a plain object during file upload.

To resolve this issue you need to first convert this into a string using JSON.stringify() before sending, and after that you can parse it back inside n8n.

I hope it will fix your issue

1 Like

thank you so much

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.