CommCare

The Commcare modules allow you to watch the forms, and cases in your Commcare account.

Getting Started with Commcare

Prerequisites

  • A Commcare account

In order to use Commcare with Integromat, it is necessary to have a CommCare account. If you do not have one, you can create a Commcare account at dimagi.com/commcare.

The module dialog fields that are displayed in bold (in the Integromat scenario, not in this documentation article) are mandatory!

Connecting Commcare to Integromat

To connect your Commcare account to Integromat you need to obtain the API Key from your CommCare account and insert it in the Create a connection dialog in the Integromat module.

1. Log in to your CommCare account.

2. Click Settings (the cog-wheel) > My Account Settings > API Keys.

Qn13D5gtgZ.gif

3. Enter a name for the API Key, select the permissions, and click Generate API Key.

commcare1.png

4. Copy the API key to your clipboard.

Commcare2.png

5. Go to Integromat and open the CommCare module's Create a connection dialog.

K3YwTi5JrH.gif

6. In the Connection name field, enter a name for the connection.

7. In the Username field, enter your account's username.

8. In the API Key field, enter the API details copied in step 4 and Continue.

The connection has been established.

Forms

To trigger the watch modules, see the Setting Up the CommCare Webhooks.

Watch New Form Submissions

Triggers when a new form is submitted.

Webhook Name Enter a name for the webhook.
Connection Establish a connection to your CommCare account

Cases

To trigger the watch modules, see the Setting Up the CommCare Webhooks.

Watch New Cases

Triggers when a new case is created.

Webhook Name Enter a name for the webhook.
Connection Establish a connection to your CommCare account

Watch New or Updated Case

Triggers when a new case is created or an existing case is modified.

Webhook Name Enter a name for the webhook.
Connection Establish a connection to your CommCare account

Watch Updated Case

Triggers when an existing case is modified.

Webhook Name Enter a name for the webhook.
Connection Establish a connection to your CommCare account

Other

Make an API Call

Performs an arbitrary authorized API call.

Connection Establish a connection to your CommCare account.
URL

Enter a path relative to https://api.commcarehq.org/. For example: /a/project/api/v0.5/web-user

For the list of available endpoints, refer to the CommCare API Documentation.
Method

Select the HTTP method you want to use:

GET
to retrieve information for an entry.

POST
to create a new entry.

PUT
to update/replace an existing entry.

PATCH
to make a partial entry update.

DELETE
to delete an entry.

Headers Enter the desired request headers. You don't have to add authorization headers; we already did that for you.
Query String Enter the request query string.
Body Enter the body content for your API call.

Example of Use - Get Users

The following API call returns users of the specified project from your CommCare account:

URL:
/a/telecommute/api/v0.5/web-user/

Method:
GET

commcare5.png

Matches of the search can be found in the module's Output under Bundle > Body > objects
In our example, 1 user details were returned:

commcare4.png

Setting Up the CommCare Webhooks

1. Open any Watch module, establish a connection, click Save, and copy the URL address to your clipboard. Click OK and save the trigger.

zD4kfOeKFo.gif

2. Log in to your CommCare account. From the Dashboard, click Settings > Connection Settings > Add Connection Settings.

IagvVtEnHc.gif

3. Enter the details for the connection and click Save.

Name Enter a name for the webhook.
Address to send notifications Enter the email address to which you want to send the trigger notifications.
URL Enter the URL address copied in step 1.
Auth Type

Select the authentication type and enter the details:

  • None
  • HTTP Basic
  • HTTP Digest 
  • Bearer Token
  • OAuth1
  • OAuth 2.0 Password Grant
Skip Certificate Verification Select the checkbox to skip the certificate verification.

commcare3.png

You have created the connection successfully.

commcare6.png

Once you have created the webhook connection, setup the required data forwarding as mentioned here.

 

Popular use cases from our blog

slack-automation-illustration

Slack Automation: 20 Free Templates to Get You Inspired

google-sheets-automation-alt

Google Sheets Automation for Ecommerce: 23 Free Templates

tweet-automation-illustration

How to Get Someone's Tweets Before Anyone Else Does

onboarding-automation-with-integromat-alt

How to Automate Employee Onboarding in Minutes with Integromat

shopify-order-to-manufacturer-illustration-alt

How to Auto Send Shopify Orders to Dropshipping Suppliers [Guide]

strava-exercise-to-google-sheets-illustration

Like a Champ: How to Save Strava Activities to Google Sheets

Didn’t find what you were looking for?

Ticket

Create a ticket

Contact our world-class support team and tell us what’s happening.

Create a ticket
Expert

Find an expert

We feature a network of 450+ certified partners across the globe who are ready to help

Find an expert

Automate any workflow in your business

Sign up for a free account today. No credit card required, no time limits on free plan.