Rav says, (Maseches Berachos 54) that four are obligated to offer thanks: persons who have safely completed a sea or land journey, or who have recovered from a serious illness, or have been released from captivity. One who is obligated to recite the blessing of thanksgiving should do so at the Torah-scroll, after the blessing following the Torah reading is said.
בָּרוּךְ אַתָּה יְהֹוָה Blessed are You, Adonoy
אֱלֹהֵֽינוּ מֶֽלֶךְ הָעוֹלָם our God, King of the Universe,
הַגּוֹמֵל לְחַיָּבִים טוֹבוֹת Who bestows goodness upon the guilty,
שֶׁגְּ֒מָלַֽנִי כָּל טוֹב: Who has bestowed every goodness upon me.
The congregation responds:
מִי שֶׁגְּ֒מָלְךָ טוֹב He Who has bestowed goodness upon you,
הוּא יִגְמָלְךָ כָּל טוֹב may He bestow every goodness upon you,
סֶֽלָה: forever.
Blessing by the father of a Bar Mitzvah
The following blessing is said by the father of a Bar Mitzvah, after the lad has been called to the Torah and has recited the blessing following the reading:
בָּרוּךְ אַתָּה יְהֹוָה Blessed are You, Adonoy
אֱלֹהֵֽינוּ מֶֽלֶךְ הָעוֹלָם our God, King of the Universe,
שֶׁפְּ֒טָרַֽנִי מֵעֹֽנֶשׁ Who has released me from the punishment
שֶׁל זֶה: of this [boy].
When the reading of the Torah is concluded, the Half Kaddish is recited by the Reader. The Maftir is read and then the Torah is raised so that the congregation can see the script, and the congregation exclaims:
וְזֹאת הַתּוֹרָה אֲשֶׁר שָׂם משֶׁה This is the Torah which Moses placed
לִפְנֵי בְּנֵי יִשְׂרָאֵל before the children of Israel.
עַל פִּי יְהֹוָה בְּיַד משֶׁה: at Adonoy's command by the hand of Moses.
עֵץ חַיִּים הִיא It is a tree of life
לַמַּחֲזִיקִים בָּהּ to those who grasp to it,
וְתוֹמְ֒כֶֽיהָ מְאֻשָּׁר: and those who support it are fortunate.
דְּרָכֶֽיהָ דַּרְכֵי נֹֽעַם Its ways are ways of pleasantness,
וְכָל נְתִיבוֹתֶֽיהָ שָׁלוֹם: and all its paths are peace.
אֹֽרֶךְ יָמִים בִּימִינָהּ Long life is at its right,
בִּשְׂמֹאלָהּ עֽשֶׁר וְכָבוֹד: at its left, riches and honor.
יְהֹוָה חָפֵץ Adonoy desired,
לְמַֽעַן צִדְקוֹ for the sake of His righteousness,
יַגְדִּיל תּוֹרָה וְיַאְדִּיר: to make the Torah great and to glorify it.