Background: Chronic pain is a globally prevalent condition. It is closely linked with psychological well-being, and it is often concomitant with anxiety, negative affect, and in some cases even depressive disorders. In the case of musculoskeletal chronic pain, frequent physical activity is beneficial. However, reluctance to engage in physical activity is common due to negative psychological associations (eg, fear) between movement and pain. It is known that encouragement, self-efficacy, and positive beliefs are effective to bolster physical activity. However, given that the majority of time is spent away from personnel who can give such encouragement, there is a great need for an automated ubiquitous solution. Objective: MyBehaviorCBP is a mobile phone app that uses machine learning on sensor-based and self-reported physical activity data to find routine behaviors and automatically generate physical activity recommendations that are similar to existing behaviors. Since the recommendations are based on routine behavior, they are likely to be perceived as familiar and therefore likely to be actualized even in the presence of negative beliefs. In this paper, we report the preliminary efficacy of MyBehaviorCBP based on a pilot trial on individuals with chronic back pain. Methods: A 5-week pilot study was conducted on people with chronic back pain (N=10). After a week long baseline period with no recommendations, participants received generic recommendations from an expert for 2 weeks, which served as the control condition. Then, in the next 2 weeks, MyBehaviorCBP recommendations were issued. An exit survey was conducted to compare acceptance toward the different forms of recommendations and map out future improvement opportunities. Results: In all, 90% (9/10) of participants felt positive about trying the MyBehaviorCBP recommendations, and no participant found the recommendations unhelpful. Several significant differences were observed in other outcome measures. Participants found MyBehaviorCBP recommendations easier to adopt compared to the control (βint=0.42, P<.001) on a 5-point Likert scale. The MyBehaviorCBP recommendations were actualized more (βint=0.46, P<.001) with an increase in approximately 5 minutes of further walking per day (βint=4.9 minutes, P=.02) compared to the control. For future improvement opportunities, participants wanted push notifications and adaptation for weather, pain level, or weekend/weekday. Conclusions: In the pilot study, MyBehaviorCBP’s automated approach was found to have positive effects. Specifically, the recommendations were actualized more, and perceived to be easier to follow. To the best of our knowledge, this is the first time an automated approach has achieved preliminary success to promote physical activity in a chronic pain context. Further studies are needed to examine MyBehaviorCBP’s efficacy on a larger cohort and over a longer period of time.