The fable retold by Fitzgerald can be traced to the first half of the 19th century, appearing in American papers by at least as early as 1839. It usually involved a nameless "Eastern monarch ''. Its origin has been traced to the works of Persian Sufi poets, such as Sanai and Attar of Nishapur. Attar records the fable of a powerful king who asks assembled wise men to create a ring that will make him happy when he is sad. After deliberation the sages hand him a simple ring with the words "This too will pass '' etched on it, which has the desired effect to make him happy when he is sad. It also, however, became a curse for whenever he is happy.
where does the phrase this too shall pass come from
the works of Persian Sufi poets, such as Sanai and Attar of Nishapur