| 1 | { |
| 2 | "schema": 1, |
| 3 | "id": "hubspot", |
| 4 | "name": "HubSpot", |
| 5 | "category": "crm", |
| 6 | "auth": { |
| 7 | "kind": "both", |
| 8 | "base": "https://api.hubapi.com", |
| 9 | "authorization": "Bearer", |
| 10 | "pat_help": "https://developers.hubspot.com/docs/api/private-apps — create a private app with only the CRM scopes you want reachable", |
| 11 | "oauth": { |
| 12 | "authorize_url": "https://app.hubspot.com/oauth/authorize", |
| 13 | "token_url": "https://api.hubapi.com/oauth/v1/token", |
| 14 | "scopes": ["oauth", "crm.objects.contacts.read", "crm.objects.deals.read"], |
| 15 | "scopes_write": ["oauth", "crm.objects.contacts.read", "crm.objects.deals.read", "crm.objects.contacts.write"] |
| 16 | } |
| 17 | }, |
| 18 | "ops": [ |
| 19 | { |
| 20 | "id": "viewer", |
| 21 | "label": "Which account am I connected to", |
| 22 | "access": "read", |
| 23 | "method": "GET", |
| 24 | "path": "/account-info/v3/details", |
| 25 | "pick": { |
| 26 | "fields": [ |
| 27 | "portalId", |
| 28 | "accountType", |
| 29 | "timeZone", |
| 30 | "companyCurrency", |
| 31 | "uiDomain" |
| 32 | ] |
| 33 | } |
| 34 | }, |
| 35 | { |
| 36 | "id": "contacts.list", |
| 37 | "label": "List recent contacts", |
| 38 | "access": "read", |
| 39 | "method": "GET", |
| 40 | "path": "/crm/v3/objects/contacts?limit=10", |
| 41 | "pick": { |
| 42 | "root": "results", |
| 43 | "fields": [ |
| 44 | "id", |
| 45 | "properties.email", |
| 46 | "properties.firstname", |
| 47 | "properties.lastname", |
| 48 | "createdAt" |
| 49 | ] |
| 50 | } |
| 51 | }, |
| 52 | { |
| 53 | "id": "deals.list", |
| 54 | "label": "List recent deals", |
| 55 | "access": "read", |
| 56 | "method": "GET", |
| 57 | "path": "/crm/v3/objects/deals?limit=10&properties=dealname,amount,dealstage,closedate", |
| 58 | "pick": { |
| 59 | "root": "results", |
| 60 | "fields": [ |
| 61 | "id", |
| 62 | "properties.dealname", |
| 63 | "properties.amount", |
| 64 | "properties.dealstage", |
| 65 | "properties.closedate", |
| 66 | "createdAt" |
| 67 | ] |
| 68 | } |
| 69 | }, |
| 70 | { |
| 71 | "id": "contact.create", |
| 72 | "label": "Create a contact", |
| 73 | "access": "write", |
| 74 | "method": "POST", |
| 75 | "path": "/crm/v3/objects/contacts", |
| 76 | "args": { |
| 77 | "email": { |
| 78 | "required": true |
| 79 | }, |
| 80 | "firstname": {}, |
| 81 | "lastname": {} |
| 82 | }, |
| 83 | "body_json": { |
| 84 | "properties": { |
| 85 | "email": "{email}", |
| 86 | "firstname": "{firstname}", |
| 87 | "lastname": "{lastname}" |
| 88 | } |
| 89 | }, |
| 90 | "confirm": "Create the HubSpot contact {email}?" |
| 91 | } |
| 92 | ] |
| 93 | } |
| 94 | |