How can I convert my custom give command to a Minecraft villager trade command? [duplicate]

I just made a command for an invisibility potion that lasts 25 seconds. (3 min is way to long for the mini-game I am making.) Here is the code:

/give @p minecraft:potion{CustomPotionEffects:[{Id:14,Duration:500,ShowParticles:0b}],CustomPotionColor:16576248,display:{Name:"\"Potion of Invisibility\""}}

I just don't know how to turn it into put it into this villager trade command:

{buy:{id:emerald,Count:2},sell:{id:potion,Count:1,tag:{Potion:"minecraft:invisibility"}}}]}}\

It would be in place of the sell portion.


Solution 1:

The tag tag contains all the NBT tags of the item, so you simply put CustomPotionEffects, CustomPotionColor and display into there.