Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for extended JSON in mongo node #12574

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

juandl
Copy link

@juandl juandl commented Jan 12, 2025

Summary

This PR enhances the MongoDB node by adding support for Extended JSON (EJSON). With this update, users can now leverage EJSON features, such as converting values to specific types like "$date", making it easier to handle complex MongoDB operations directly within the node.

How to test:

  1. Create or edit a MongoDB node in a workflow.
  2. Input EJSON-formatted data, e.g., { "createdAt": { "$date": "2025-01-01T00:00:00Z" } }.
  3. Execute the node and verify the data is processed correctly in MongoDB.

Note: EJSON.parse will handle both normal JSON and Extended JSON gracefully.

Related Linear tickets, GitHub issues, and Community forum posts

https://community.n8n.io/t/mongodb-date-objects-in-queries/40935/6
https://community.n8n.io/t/mongo-node-prefiltering-by-dates/4124

Review / Merge checklist

  • PR title and summary are descriptive.

@CLAassistant
Copy link

CLAassistant commented Jan 12, 2025

CLA assistant check
All committers have signed the CLA.

@n8n-assistant n8n-assistant bot added community Authored by a community member node/improvement New feature or request in linear Issue or PR has been created in Linear for internal review labels Jan 12, 2025
@Joffcom
Copy link
Member

Joffcom commented Jan 12, 2025

Hey @juandl,

Thanks for the PR, We have created "GHC-623" as the internal reference to get this reviewed.

One of us will be in touch if there are any changes needed, in most cases this is normally within a couple of weeks but it depends on the current workload of the team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Authored by a community member in linear Issue or PR has been created in Linear for internal review node/improvement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants