I found the answer here : How to add metadata to all chunks when embedding in Pinecone Vector Database - #2 by jennapederson
Metedata fields need to be specified in the in the “Default Document Loader”, you can add options : Metadata fields. This way everything works fine now.
Thanks for your suggestions.