Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

Commcare now has basic Zapier integration, allowing you to trigger any Zapier action off of incoming CommCare form submissions. The following document will walk you through how to setup a basic Google Sheets integration.

 Prerequisites

To begin setting up your integration you will need the following:

  • An account with Zapier

  • A project space on CommCareHQ with an application.

  • Have submitted a form with the application you want to setup the integration for.

  • A google sheet setup to collect your data.

...

  1. Proceed to Google Sheets

  2. Create a new sheet
  3. Open the sheet

  4. Select a tab one of the tabs in the sheet and enter the following text in the first row of the sheet:

...

  1. Proceed to your Zapier and log in to your account.

    1. If you have not created an account, proceed to www.zapier.com and sign up for one.

  2. Once logged in, select Make a Zap at the top of the page

  3. On the next page, you will be prompted to ‘Choose a Trigger App.’ Search for and select CommCare.

  4. For ‘Select CommCare’ trigger, choose Form Submission. This should be the only option you can choose. Select continue.

  5. When on the page that asks you to ‘Select CommCare Account,’ select create a new account.
    Image Modified

  6. A new window should pop up asking for your username and API key.

    1. The user name should be a web user account that you login to CommCareHQ with.

  7. The API Key can be found by proceeding to My Account Settings of CommCareHQ. Select the Gear icon in the top right, followed by My Account Settings: 



  8. On the My Information page, you should see the API key. Copy and pate this string into the corresponding field:

     

  9. You should now be on the Set up CommCareHQ Form

    1. Select the Domain, Application and Form that you would like to trigger the action for. Select continue once doneyou choose the form.

      1. NOTE: You need to have submitted a form for the application you are setting the zap up for. It does not matter when this form was submitted, just that the application has been used before.  

  10. After selecting the Domain, Application and Form, you will be brought to a page where you can test the setup. Select ‘Fetch and Continue’

...

  1. After setting up the trigger, you should be prompted to add an Action. Select to add one.

  2. Choose Google Sheets.

  3. For an action, select Create Spreadsheet Row. Select ‘Save + Continue.

  4. On the Set Up Template page, select the Spreadsheet dropdown. Select the spreadsheet you just set up.

  5. Select the worksheet that you added the headers to. The headers should now appear with as drop down fields beneath the worksheet field.

    Image Added

  6. Proceed to match up the column headers with the corresponding data that is collected in the form.

    1. <image>

  7. For example, for caseid you would want to use Form @case id.

  8. <image>
  9. as follows:
    Image Added 

    1. username = Form Meta Username

    2. timestart = Form Time Start
    3. timeend = Form Time End
    4. caseid = Form Case @case ID
    5. case_name = Form Casename
  10. After matching up the fields, select continue.

  11. You should be brought to a page where you can test the integration. Select Create and Continue. You should receive a notification that the action was successful or not.

    1. If successful, proceed to the spreadsheet and confirm it now has some data in it!

    2. If unsuccessful, please review the steps to ensure everything is setup correctly.


You have successfully set up your CommCare Zap! For every submission of the Form you chose, a new row should be added to the google sheet!