Working with the OpenCollective API

Step 1 — Catch the webhook from OpenCollective

Zapier Screenshot
Output:
raw_body: {“createdAt”:”2022–10–19T15:29:44.538Z”,”id”:4076674,”type”:”collective.member.created”,”CollectiveId”:528032,”data”:{“member”:{“role”:”BACKER”,”description”:null,”since”:”2022–10–19T15:29:44.523Z”,”memberCollective”:{“id”:502816,”type”:”USER”,”slug”:”richard-bartlett”,”name”:”Richard Bartlett”,…

Step 2 — Extract an identifier for the new member

Pattern: 
"slug":"(\S*)",
Input:
…”since”:”2022–10–19T15:29:44.523Z”,”memberCollective”:{“id”:502816,”type”:”USER”,”slug”:”richard-bartlett”,”name”:”Richard Bartlett”,…
Output:
richard-bartlett

Step 3 — Get the member’s email address from OC

{“query”:”query account($slug: String) {\n account(slug: $slug) {\n id\n name\n slug\n emails\n }\n}\n”,”variables”:{“slug”:”richard-bartlett”}}

Step 4 — Invite new member to calendar event

More about Microsolidarity

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store