CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Google Summer of Code »
  • Gsoc '16 --- Integrating CiviCRM with Zapier
Pages: 1 [2]

Author Topic: Gsoc '16 --- Integrating CiviCRM with Zapier  (Read 2347 times)

merci

  • I’m new here
  • *
  • Posts: 24
  • Karma: 2
  • CiviCRM version: 4.7.3
  • CMS version: Drupal 7.4
  • MySQL version: 5.6.28
  • PHP version: 5.6.11
MORE FINDINGS
May 05, 2016, 04:13:02 am
ZAPIER SCRIPTING API
====================

 Zapier has a scripting library which enables us to maniulate the requests and responses that are exchanged between CiviCRM API and Zapier. With this functionality, responses can be parsed before Zapier does anything with them

For Example
===========

TRIGGER_KEY_catch_hook - runs when Zapier receives a static or subscription hook from CiviCRM  API. Can parse the response to format the data that enters Zapier.

an example format for that is shown below

var Zap = {
  TRIGGERKEY_catch_hook: function(bundle) {
    /*
    Argument:
      bundle.request.method: <str> # 'GET', 'POST', 'PATCH', 'PUT', 'DELETE'
      bundle.request.headers: <object>
      bundle.request.querystring: <str>
      bundle.request.content: <str>

      bundle.cleaned_request: <object> or <array> # our best guess at parsing
                                                  # and combining the request
                                                  # (including handling JSON & XML).
      bundle.auth_fields: <object>
      bundle.trigger_fields: <object> # the fields provided by the user during setup

      bundle.zap: <object> # info about the zap

    The response should be either a JSON serializable array...
      [
        <object>,
        <object>
      ]

    ...or a single object:
      <object>
    */
    return []; // or {}
  }
}


NOTE  ---> there is also possibility for subscription and unsubscription as explained here  https://zapier.com/developer/documentation/v2/scripting/

merci

  • I’m new here
  • *
  • Posts: 24
  • Karma: 2
  • CiviCRM version: 4.7.3
  • CMS version: Drupal 7.4
  • MySQL version: 5.6.28
  • PHP version: 5.6.11
What i worked on yesterday and Today
May 06, 2016, 06:25:23 pm

TASKS FOR fRIDAY AND SATURDAY

-Added CiviCRM as an application on Zapier

-Set up Authentication for CiviCRM App on Zapier

-Install Firefox Addon ‘Poster’

-Learn the basics of using ‘poster’

-Create a new Trigger to reflect a contribution

-Create a new webhook as the data source

-Get a unique URL which will be used to send that data in the webhook

- Documented on Review Document work done so far ( wll share the doc with mentor for review before documenting on wiki)


merci

  • I’m new here
  • *
  • Posts: 24
  • Karma: 2
  • CiviCRM version: 4.7.3
  • CMS version: Drupal 7.4
  • MySQL version: 5.6.28
  • PHP version: 5.6.11
What I did Today
May 07, 2016, 06:07:56 am
Reviewed the Documentation of Yesterday and completed the remaining tasks, these are:


-Learn the basics of using ‘poster’

-Create a new Trigger to reflect a contribution

-Create a new webhook as the data source

-Get a unique URL which will be used to send that data in the webhook


merci

  • I’m new here
  • *
  • Posts: 24
  • Karma: 2
  • CiviCRM version: 4.7.3
  • CMS version: Drupal 7.4
  • MySQL version: 5.6.28
  • PHP version: 5.6.11
What I did Today
May 09, 2016, 07:24:59 am
Today I took out time to:

- Request For a surveypal account and explain to them the importance of what the project encompases

- Explore Surveypal account to the context of the project (what we need to do the integration

- Prepare a Test Trigger for integration with surveypal on Zapier

- Create an API key token with the surveypal account


merci

  • I’m new here
  • *
  • Posts: 24
  • Karma: 2
  • CiviCRM version: 4.7.3
  • CMS version: Drupal 7.4
  • MySQL version: 5.6.28
  • PHP version: 5.6.11
Tasks For Today
May 16, 2016, 12:11:48 am
TASK FOR THE WEEK

- use Surveypal account on Zapier to see possibilities of a Zap between Surveypal and CiviCRM App on Zapier

- Create a new survey on surveypal
 
- Add Surveypal user account to Zapier

- Create a trigger between CiviCRM and Zapier

- Choose an action to create possibly with Surveypal

- Create action on surveypal to share the link of a survey so a user can answer a few questions

PIPELINE WORK

- Updating wiki page
- send link to mentor requesting to move wiki page to appropriate loc.
« Last Edit: May 16, 2016, 12:22:17 am by merci »

merci

  • I’m new here
  • *
  • Posts: 24
  • Karma: 2
  • CiviCRM version: 4.7.3
  • CMS version: Drupal 7.4
  • MySQL version: 5.6.28
  • PHP version: 5.6.11
Tasks For The Week
May 24, 2016, 12:22:31 am
This week i will carry out the following

  • Evaluate work Done so far
  • Plan Entire Mid Term with mentor
  • Continue wiki Documentation

merci

  • I’m new here
  • *
  • Posts: 24
  • Karma: 2
  • CiviCRM version: 4.7.3
  • CMS version: Drupal 7.4
  • MySQL version: 5.6.28
  • PHP version: 5.6.11
Tasks For The Week
May 29, 2016, 11:04:55 pm
This week I will perform the following tasks

  • Create the Zap between CiviCRM and SurveyMonkey ( since surveyPal doesn't seem to work)
  • Use the Api explorer to querry for the scenario in user story 1
  • Configure a new webhook for the test on zapier
  • Hit the webhook endpoint with data using poster
  • Start Documentation
  • Share the documentation with Mentor
« Last Edit: May 29, 2016, 11:51:26 pm by merci »

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Gsoc '16 --- Integrating CiviCRM with Zapier
May 29, 2016, 11:11:26 pm
Sounds good, I will try to investigate SurveyPal if I have some time
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

merci

  • I’m new here
  • *
  • Posts: 24
  • Karma: 2
  • CiviCRM version: 4.7.3
  • CMS version: Drupal 7.4
  • MySQL version: 5.6.28
  • PHP version: 5.6.11
What I have Done Since Last Meeting
June 10, 2016, 01:48:11 am
The Following Tasks were carried out

  • Setting up Zap Between CiviCRM and Survey Monkey
  • Setting up Zap between CiviCRM and SurveyPal
  • Comparing both Zaps and Choosing the Best
  • reported progress to mentor
  • Do wiki Documentation on all work done so far
  • Review of Wiki in preparation for meeting
  • Prepare for Plan meeting for end of mid-term
« Last Edit: June 10, 2016, 01:50:21 am by merci »

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Gsoc '16 --- Integrating CiviCRM with Zapier
June 10, 2016, 01:58:42 am
Good progress Merci!
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

merci

  • I’m new here
  • *
  • Posts: 24
  • Karma: 2
  • CiviCRM version: 4.7.3
  • CMS version: Drupal 7.4
  • MySQL version: 5.6.28
  • PHP version: 5.6.11
Tasks For The Week
June 13, 2016, 09:24:09 pm
For this week I intend to to carry out the following tasks

  • Complete Wiki Documentation
  • Review Requirements for New extension
  • Prepare For weekly meeting

merci

  • I’m new here
  • *
  • Posts: 24
  • Karma: 2
  • CiviCRM version: 4.7.3
  • CMS version: Drupal 7.4
  • MySQL version: 5.6.28
  • PHP version: 5.6.11
Tasks For The Week
June 20, 2016, 12:10:07 am
For this week i will plan the following tasks

  • Plan For First Meeting on final evaluation and Other tasks
  • Revisit wiki on extensions , API wrappers , and setting up and using Civix
  • Create review the use of Curl to send requests
  • Communicate the issues to the mentor
]

merci

  • I’m new here
  • *
  • Posts: 24
  • Karma: 2
  • CiviCRM version: 4.7.3
  • CMS version: Drupal 7.4
  • MySQL version: 5.6.28
  • PHP version: 5.6.11
Requirement for extension for Gsoc project
June 29, 2016, 04:32:13 am
The Requirement for the extension for the project on the integration of CiviCRM with Zapier has been illustrated in the steps below

  • Create an extension called cm.mercimukwe.zapiercivicrm (or something like this)
  • Create a class called Zapier (full name CRM_Zapiercivicrm_Zapier). This class deals with the basic Zapier on a generic level and can be used by our Proof of Concept for sending a Survey but potentially for any data to be send from CiviCRM to Zapier and receiving data from Zapier as far as we know now. I expect properties like hookUrl, userAuth, userAuthValue, timeOut, action  etc. It will probably contain methods like

                             setUpWebhook: set up for a Zapier webhook and storing the Zapier URL key in a property
                             config: for any setting stuff like the URL to use?
                             sendRequest: Sending a request to Zapier.
                             receiveRequest: Receiving data from Zapier Etc.

  • Create a class called Survey (full name CRM_Zapiercivicrm_Survey) which extends class Zapier and holds the specific methods for our specific example. This class will hold additional properties for the specific action like tresholdAmount, email, surveyData etc. and will have specific methods or possibly overridden parent methods
  • Use civix to generate an API: entity Zapier action Submit (and in the future but not in this step probably also an action Receive). This API should be as limited as possible and only call the relevant method of class Zapier with all the params required.
  • Add a CiviRule action Send Zapier Request (or whatever name you like) which calls the API Zapier Submit.
  • Add a CiviRule to check for the contribution condition and then send the Zapier Request




« Last Edit: June 29, 2016, 04:36:10 am by merci »

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Google Summer of Code »
  • Gsoc '16 --- Integrating CiviCRM with Zapier

This forum was archived on 2017-11-26.