Flowchart summary of STAMP + CBT app features and functionalities, including pusheda and patient-initiated content. EMAb and JITAIc survey components, and example “message bins”d. aIf patients did not respond to or dismissed a push notification, they were not able to interact with that content. Content was delivered on a pre-determined schedule to mirror content delivery in pain-CBT modules, beginning with pain- and opioid-specific medical advice, biopsychosocial aspects of pain, stress and pain, goals and activity pacing, cognitive restructuring, emotional processing, and relaxation exercises. bUpon completion of EMAs, patients were shown a summary of their responses (see Fig. 2). On following screens, they could review individualized messages and advice, which were paired with links to pain-CBT content. cWhen patients reported severe symptoms, the app prompted them to contact their palliative care provider using the clinic phone number on the home screen or to call 911. The same algorithm also pushed an automated email that listed their severe symptoms to the study team. The study team then shared this report with the patient’s care team through secure email to encourage them to reach out accordingly. Patients were made aware that study staff monitored the app only during business hours. dEach “message bin” consisted of customized messages and paired educational content delivered on a rotating basis with a green, yellow, or red background corresponding to mild, moderate, or severe symptoms