Docs
Metadata
Metadata
Learn how to send custom metadata from your chat widget to n8n workflows.
You can send custom data from your chat widget to your n8n workflow by passing it inside a new metadata
key in the embed script configuration.
What is metadata?
The metadata
object is a root-level property in your widget configuration. You can include any type of data—strings, numbers, arrays, or nested objects—and it will be sent along with every message to your connected n8n chat webhook.
IMPORTANT:
By default, the widget sends these two values inmetadata
:
clientCurrentDateTime
clientCurrentTimezone
If you define either of these keys in your custom metadata, your value will override the default.
Sending Custom Metadata
Below is a sample embed script showing how to add custom metadata:
<script type="module" defer>
import Chatbot from "https://n8nchatui.com/v1/embed.js";
Chatbot.init({
n8nChatUrl: 'YOUR_N8N_CHAT_WEBHOOK_URL',
metadata: {
ownStringkey: '123',
ownList: [1, 2, 3, 4],
someotherkey: {
key: 'value'
},
},
theme: {
// your theme config here
}
});
</script>
How Metadata Appears in n8n

Use Cases
- Pass user IDs, session data, or custom context to your n8n workflow.
- Track additional analytics or debugging information.
- Send structured data for downstream automation.
Summary
- Add any custom fields to the
metadata
object in your embed script. - All metadata is sent with every message to your n8n webhook.
- Default values are provided but can be overridden.
- Use this feature to enrich your workflows with context and custom data.