Expanding Astral Sea's answer, the story described in the question is about "Kaguya Robot", originally from manga volume 37 (under Tentoumusi comics label). The theme is based on "The Tale of Princess Kaguya".
The 1979 version anime (episode 736) with the same title "Kaguya Robot" adapted the story faithfully. (This is the one that's described in the question)
The 2005 "renewal" version (episode 103B/195) titled "Nobita Raises Princess Kaguya" has a different story development while using the same "Princess Kaguya" theme.
Some of the differences are:
Volume 37 "Kaguya Robot"
- The 22nd-century department store mistakenly delivered "Kaguya Robot"
- Doraemon hid it, but Nobita used it
- Nobita hid the newly-born Princess Kaguya from his mom and everyone
- Doraemon was very angry when he saw Kaguya Robot. Even though Nobita insisted to hide and raise her, Doraemon pointed his lack of plan cool-headedly
- When a wealthy person saw her daytime, he said "(she is) as alike as two melons as her late daughter. Please let her be adopted daughter."
- When Nobita bod farewell to Kaguya, he muttered: "A welcome from the moon came."
Anime "Nobita Raises Princess Kaguya"
- The 22nd-century department store delivered a new product "Experience Folklore Set - Princess Kaguya Version"
- Nobita hid it from Doraemon and used the tool
- A newly-born Princess Kaguya befriended with Nobita's parents, his friends, and also Doraemon
- Princess Kaguya was making a sad face when she saw a full moon
- "Messenger from the moon" came and Nobita & co.'s repellance was in vain, then Princess Kaguya had to return
- When Princess Kaguya bod farewell, the letter she passed was the bill from the 22nd-century department store.
References: