How to connect CommCareHQ to a REST endpoint

Thanks for reaching out! Set up “form forwarding” in CommCareHQ and specify JSON, using your OpenFn inbox URL as the target:

Next, create a message-filter trigger like this: (You want to run some job whenever a message matching that CommCare formID shows up.)

Your job should use the language-http adaptor, and probably an expression like this to make a POST to your REST endpoint:

Turn on the job and submit some data in CommCare. You should see it run on OpenFn instantly. Check out the logs to determine what changes need to be made to your expression and then retry whatever runs you’d like until it works as desired.

Let me know if you need anything else. I’ve added this thread to our Google Group (after removing your name and email) because it will be incredibly helpful to others. If you’re keen, post in that group as a follow-up. Thanks so much.

Updated docs here: