Jonah's story is told in the Book of Jonah — sent by God to Nineveh, fleeing by ship, swallowed by a great fish, and finally preaching to the city.
Traditional attribution: The Book of Jonah is traditionally attributed to Jonah (Wikidata Q2468262).
Key passages:
"Arise, go to Nineveh, that great city, and cry against it; for their wickedness is come up before me." — Jonah 1:2
"Now the LORD had prepared a great fish to swallow up Jonah. And Jonah was in the belly of the fish three days and three nights." — Jonah 1:17
"And the LORD spake unto the fish, and it vomited out Jonah upon the dry land." — Jonah 2:10
"And God saw their works, that they turned from their evil way; and God repented of the evil, that he had said that he would do unto them; and he did it not." — Jonah 3:10
Read the full account in Jonah — the book is only four chapters.