Market Gnome's last ability will go onto the stack above the craft ability that caused it to trigger. This means you'll gain 1 life and draw a card before the transformed card returns to the battlefield.

Artwork
Loading artwork…
Market Gnome
The Lost Caverns of Ixalan · #22 · EN
Nonfoil—Foil—
Card rules
When this creature dies, you gain 1 life and draw a card.
When this creature is exiled from the battlefield while you're activating a craft ability, you gain 1 life and draw a card.
0/3
"Maize, sweet and fresh! Tamal, hot and filling! Water, still or sparkling!"
Uncommon · Illustrated by Gaboleps
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pioneer Legal
Standard Legal
Standard Brawl Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
PreDH Not Legal
Premodern Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
Most of the time, Market Gnome's last ability will trigger because it was exiled as one of the components used in the craft ability. However, in some uncommon cases, the ability will also trigger if Market Gnome is exiled while you're activating mana abilities as part of paying for that craft ability.