Sefer Chasidim Siman 818
Can copy this into an AI, or connect the whole library to your assistant. For deeper learning, you can directly use the original seforim, sites, and apps.
אדם צריך להיות מבפנים כבחוץ שנאמר (תהלים קג א) וכל קרבי את שם קדשו שלא יהא בקרביו טנופת לכך קודם שיתפלל וקודם אכילה ושתיה שהוא צריך לברך יעשה אדם צרכיו קודם שילך לבית הכנסת וקודם שיאכל: