The story of the origin of River Kaveri through Lord Ganesha in the form of a crow is found in the Skanda Purana (Southern Recension).
This story is narrated in Chapters 11 and 12 of the Asura Kanda, in the Shivarahasya Kanda of the Shankara Samhita of the Skanda Purana, and the complete narration can be read here: Skanda Purana - Shankara Samhita - Page 305 - 314.
The Skanda Purana (Southern Recension) is divided into six Samhitas, out of which the Shankara Samhita contains the Shivarahasya Kanda which narrates the story of Lord Murugan and his exploits, which was further translated and expanded upon in the Kandha Puranam by Kacchiyappa Shivacharya. The Shivarahasya Kanda is sub-divided into seven Kandas namely Sambhava Kanda, Asura Kanda, Mahendra Kanda, Yuddha Kanda, Deva Kanda, Daksha Kanda and Upasana Kanda.
In the Asura Kanda, the narration of the origin of Kaveri occurs.
Due to Surapadman's torture, the devas are forced into hiding at several places, and amongst them Indra and Indrani hide in the Southern part of Bharata (current Tamilnadu). A furious Surapadman withholds rains from showering in the region, causing a severe drought.
Requested by all, Rishi Agastya receives the waters of Kaveri from Lord Shiva, to be distributed when he reaches the Southern region (along with strength to defeat the pride of the Vindhya mountain).
Teertham Cha Me Prayacchashu Gacchanto Dakshinam Disham |
Ityuktva Bhaktito Namram Agastyam Parameshvarah || 4 ||
Bhuyadbalam Tavatyarthe Kaaveri Cha Saridvara |
Netavyaa Rishishardula Kundikayam Nidhaaya Saa || 5 ||
"Oh Mahadeva, kindly provide me waters, as I am proceeding towards the South." - Thus spoke Rishi Agastya.
The Lord replied, "Let there be strength to you! Oh Lion among Sages, this great River Kaveri is to be carried by you in your Kamandalu!" (Skanda Purana, Shankara Samhita, Shivarahasya Kanda, Asura Kanda, Chapter 11.4-5)
On the way, after defeating the pride of the Vindhyas, and vanquishing Ilvala and Vatapi, Agastya rests for a while in Konka-desha. Sage Narada informs Indra of Agastya's arrival and informs him to worship Lord Ganesha to set things in motion.
Tishthatyaduratas So'pi Deshe Konkabhidhe'dhuna |
Tasmaat Ganapatim Sheeghram Pujayaadya Purandara || 52 ||
Prasannas Sa Tu Kaaverim Aanayishyati Sheeghratah |
Ityuktva Naradas Turnam Akasham Gatavanstada || 53 ||
"Sage Agastya is now situated nearby in Konka-desha. Therefore, Oh Purandara, without delay worship Lord Ganapati. Delighted (by your prayers), he will quickly bring River Kaveri to this region!" Saying so, Sage Narada disappeared in the skies. (Sk.P, Sh.S, SRK, AK, 11.52-53)
Indra duly worships Lord Ganesha, who appears and enquires of Indra's wishes. Indra requests him to bring the waters of Kaveri, which are stored in Agastya's Kamandalu, for the growth and nourishment of the vegetation in the land.
Indras Tadvachanam Shrutva Gambheeram Vishadaaksharam |
Vighnaraja Dayasindho! Kumbhabhuh Tapataam Varah || 6 ||
Kaaverim Saritam Punyaam Grhitva Vartate'dhuna |
Aaradevaadhuna Gatva Netavyaa Saa Tvayaa Adhuna || 7 ||
Ityuktva Prashrayaa Namram Tathetyuktva Jagaama Sah |
Kaakavesham Grhitvashu Rsher Nikatam Adbhutam || 8 ||
Hearing Lord Ganesha's words, Indra spoke with deep emotions. "Oh remover of Obstacles! Oh Ocean of Compassion! Agastya, the supreme ascetic, is seated nearby with the waters of River Kaveri! You must bring Her here (so that she may nourish the land)."
Hearing Indra's prayers, Ganesha agreed, and taking the form of a crow, he flew near the Sage. (Sk.P, Sh.S, SRK, AK, 12.6-8).
Agastyasya Tadaagatva Sthito'yam Kundikopari |
Kundikastham Rshishreshthah Kaakam Drshtva Tvarayutah || 9 ||
Karenocchaatayamaasa Tadaanim Dvijasattamaah |
Kaakastu Sheeghram Uddeeya Paadabhyam Tannipatya Cha || 10 ||
Prayayau Sheeghramevaayam Kanchidduram Bhayaadiva |
The crow then flew and perched upon Agastya's Kamandalu, seeing which Agastya hurriedly brushed it off with his hands. As if in fear, the crow took off elsewhere, knocking down the Kamandalu with its feet. (Sk.P, Sh.S, SRK, AK, 12.9-11a)
After this incident, Agastya frantically searches for the crow, and Lord Ganesha first appears as a young Brahmana on the way, before revealing his True Form, and explaining to Agastya the purpose of the leela. In accordance with Agastya's wishes, Ganesha uses the waters of Kaveri to offer obeisances to Lord Shiva, thus sanctifying the river.
(Interesting Fact: Agastya prays to Lord Ganesha using the famous Mantra "Gananam Tvam Ganapatim".)
As a result, Kaveri river begins flowing from Konka-desha throughout the Southern region, nourishing the land and restoring life and prosperity to all.