{"id":19988359,"url":"https://github.com/joaomarr/pipedrive-trello-webhook","last_synced_at":"2026-04-29T20:32:59.392Z","repository":{"id":117069817,"uuid":"528038670","full_name":"joaomarr/pipedrive-trello-webhook","owner":"joaomarr","description":"The main purpose of this webhook is to listen to Pipedrive deal's won update event, and if it is from a certain type of deal, send it as a card to Trello with custom fields.","archived":false,"fork":false,"pushed_at":"2022-09-13T12:47:35.000Z","size":1190,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-23T23:39:02.682Z","etag":null,"topics":["express","nodejs","pipedrive-api","trello-api","webhook"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joaomarr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-23T14:53:44.000Z","updated_at":"2023-03-07T05:12:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"2df29b43-3eaa-42ab-97d8-27a821150217","html_url":"https://github.com/joaomarr/pipedrive-trello-webhook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joaomarr/pipedrive-trello-webhook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaomarr%2Fpipedrive-trello-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaomarr%2Fpipedrive-trello-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaomarr%2Fpipedrive-trello-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaomarr%2Fpipedrive-trello-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joaomarr","download_url":"https://codeload.github.com/joaomarr/pipedrive-trello-webhook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaomarr%2Fpipedrive-trello-webhook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32443512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T20:22:27.477Z","status":"ssl_error","status_checked_at":"2026-04-29T20:22:26.507Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express","nodejs","pipedrive-api","trello-api","webhook"],"created_at":"2024-11-13T04:42:49.496Z","updated_at":"2026-04-29T20:32:59.347Z","avatar_url":"https://github.com/joaomarr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pipedeals\n[![Travis](https://img.shields.io/travis/com/DiegoVictor/pipedeals?logo=travis\u0026style=flat-square)](https://travis-ci.org/DiegoVictor/pipedeals)\n[![nodemon](https://img.shields.io/badge/nodemon-2.0.12-76d04b?style=flat-square\u0026logo=nodemon)](https://nodemon.io/)\n[![eslint](https://img.shields.io/badge/eslint-7.31.0-4b32c3?style=flat-square\u0026logo=eslint)](https://eslint.org/)\n[![airbnb-style](https://flat.badgen.net/badge/style-guide/airbnb/ff5a5f?icon=airbnb)](https://github.com/airbnb/javascript)\n[![jest](https://img.shields.io/badge/jest-26.6.3-brightgreen?style=flat-square\u0026logo=jest)](https://jestjs.io/)\n[![coverage](https://img.shields.io/codecov/c/gh/DiegoVictor/pipedeals?logo=codecov\u0026style=flat-square)](https://codecov.io/gh/DiegoVictor/pipedeals)\n[![MIT License](https://img.shields.io/badge/license-MIT-green?style=flat-square)](https://github.com/DiegoVictor/pipedeals/blob/main/LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\u003cbr\u003e\n[![Run in Insomnia}](https://insomnia.rest/images/run.svg)](https://insomnia.rest/run/?label=Pipedeals\u0026uri=https%3A%2F%2Fraw.githubusercontent.com%2FDiegoVictor%2Fpipedeals%2Fmain%2FInsomnia_2021-09-06.json)\n\nThe main purpose of this webhook is to listen to [Pipedrive](https://www.pipedrive.com) deal's `won` update event, and if it is from a certain type of deal, send it as a card to [Trello](https://www.trello.com) with custom fields. \n\n# Table of Contents\n* [Installing](#installing)\n  * [Configuring](#configuring)\n    * [.env](#env)\n    * [Pipedrive](#pipedrive)\n      * [Webhook](#webhook)\n      * [Custom Fields](#custom-fields)\n      * [Product](#product)\n    * [Trello](#trello-api-key)\n* [Usage](#usage)\n  * [Error Handling](#error-handling)\n    * [Errors Reference](#errors-reference)\n  * [Bearer Token](#bearer-token)\n  * [Versioning](#versioning)\n  * [Routes](#routes)\n    * [Requests](#requests)\n* [Running the tests](#running-the-tests)\n  * [Coverage report](#coverage-report)\n\n# Installing\nEasy peasy lemon squeezy:\n```\n$ yarn\n```\nOr:\n```\n$ npm install\n```\n\u003e Was installed and configured the [`eslint`](https://eslint.org) and [`prettier`](https://prettier.io) to keep the code clean and patterned.\n\n## Configuring\nFor the fastest setup is recommended to use [docker-compose](https://docs.docker.com/compose/), you just need to up all services:\n```\n$ docker-compose up -d\n```\n\n### .env\nIn this file you may configure your JWT settings, the environment, app's port, url to documentation (this will be returned with error responses, see [error section](#error-handling)) and Pipedrive and Trello's keys.\n\n|key|description|default\n|---|---|---\n|APP_PORT|Port number where the app will run.|`3333`\n|NODE_ENV|App environment.|`development`\n|PIPEDRIVE_API_TOKEN|Pipedrive API's token. See [How to find the API token](https://pipedrive.readme.io/docs/how-to-find-the-api-token) for more information.| -\n|PIPEDRIVE_DOMAIN_NAME|Pipedrive domain name (company name), see [How to get the company domain](https://pipedrive.readme.io/docs/how-to-get-the-company-domain).| -\n|PIPEDRIVE_USER and PIPEDRIVE_PWD|Basic auth's user and password (respectively). Used to ensure that the deal's event is coming from Pipedrive webhook, see [Webhook](#webhook) for more information about it.| -\n|TRELLO_API_KEY|Trello's api key. See [Trello's api key](#trello-api-key) section.| -\n|TRELLO_API_TOKEN|Trello's api token. See [Trello's api token](#trello-api-token) section.| -\n|TRELLO_LIST_ID|Trello's list id. -\n|TRELLO_BOARD_ID|Trello's board id. -\n\n### Pipedrive\nInstructions to configure the Pipedrive's webhook, custom fields and products.\n\n#### Webhook\nCreate a webhook to listen `updated.deal` event, remember to set a user (`PIPEDRIVE_USER`) and password (`PIPEDRIVE_PWD`), for more information see:\n* [Guide for Webhooks](https://pipedrive.readme.io/docs/guide-for-webhooks)\n\nThe webhook's url should be something like:\n```\nhttps://\u003cyour-domain\u003e/v1/pipedrive/events\n```\n\u003e If you are running the application local I recommend you to use [ngrok](https://ngrok.com) to export a url to access the application. (e.g. `https://25752eff.ngrok.io/v1/pipedrive/events`)\n\n![webhook](https://raw.githubusercontent.com/joaomarr/pipedrive-trello-webhook/main/screenshots/webhook.png)\n\n### Trello's API Key\nTo get a Trello's API key, go to trello app-key:\n* [App-key](https://trello.com/app-key)\n![Trello key](https://raw.githubusercontent.com/joaomarr/pipedrive-trello-webhook/main/screenshots/trello_api_key.png)\n\nThen, click on `gerar token` or `generate token`.\n\n![Trello token](https://raw.githubusercontent.com/joaomarr/pipedrive-trello-webhook/main/screenshots/trello_token.png)\n\n\n# Usage\nTo start up the app run:\n```\n$ yarn start\n```\nOr:\n```\n$ npm run start\n```\nThen create new deals, make it pass through your funnel, etc, when you mark that deal as `won` the magic will happens :)\n\n## Error Handling\nInstead of only throw a simple message and HTTP Status Code this API return friendly errors:\n```json\n{\n  \"statusCode\": 401,\n  \"error\": \"Unauthorized\",\n  \"message\": \"You are not authorized!\",\n  \"code\": 741,\n  \"docs\": \"https://github.com/DiegoVictor/pipedeals#errors-reference\"\n}\n```\n\u003e Errors are implemented with [@hapi/boom](https://github.com/hapijs/boom).\n\u003e As you can see a url to errors docs are returned too. To configure this url update the `DOCS_URL` key from `.env` file.\n\u003e In the next sub section ([Errors Reference](#errors-reference)) you can see the errors `code` description.\n\n### Errors Reference\n|code|message|description\n|---|---|---\n|531|An error occurred while trying to retrieve the deal from Pipedrive|An error occurred during the request to get the deal in Pipedrive API, look the `details` key for more information.\n|532|An error occurred while trying to retrieve the deal's custom fields from Pipedrive|The request to get custom fields from Pipedrive API throw an error. Look the `details` key for more information.\n|533|An error occurred while trying to retrieve the deal's products from Pipedrive|Occurred an error while trying to retrieve deal's products, in `details` key will be more information about the error.\n|534|An error occurred while trying to save the order at Bling|Something goes wrong when tried to send the opportunity to Bling. There are two steps here: payment method verification and buy order creation. For more information see the `details` key in the response.\n|244|Report not found|The `id` sent not references an existing report in the database.\n|344|Opportunity not found|The `id` sent not references an existing opportunity in the database.\n|440|User not exists|The `email` sent not references an existing user in the database.\n|450|User and/or password not match|User and/or password is incorrect.\n|140|Email already in use|Already exists an user with the same email.\n|640|Missing authorization|Pipedrive's webhook is not sending the Basic auth's user and password.\n|641|You are not authorized!|Pipedrive's webhook is sending wrong Basic credentials.\n|740|Missing authorization token|The Bearer Token was not sent.\n|741|You are not authorized!|The Bearer Token provided is invalid or expired.\n\n### X-Total-Count\nAnother header returned in routes with pagination, this bring the total records amount.\n\n## Bearer Token\nAll reports and oppotunities routes expect a Bearer Token in an `Authorization` header.\n\u003e You can see these routes in the [routes](#routes) section.\n```\nGET http://localhost:3333/v1/pipedrive/events Authorization: Bearer \u003ctoken\u003e\n```\n\u003e To achieve this token you just need authenticate through the `/sessions` route and it will return the `token` key with a valid Bearer Token.\n\n## Versioning\nA simple versioning was made. Just remember to set after the `host` the `/v1/` string to your requests.\n```\nGET http://localhost:3333/v1/pipedrive\n```\n\n## Routes\n|route|HTTP Method|pagination|params|description|auth method\n|:---|:---:|:---:|:---:|:---|:---:\n|`/pipedrive/events`|POST|:x:|Body with event's `event`, `current.id` and `current.status`.|Receive Piedrive deal's won event.|Basic\n\n\u003e Routes with `Bearer` as auth method expect an `Authorization` header. See [Bearer Token](#bearer-token) section for more information. `Basic` authentication is a base64 encoding of `PIPEDRIVE_USER` and `PIPEDRIVE_PWD` joined by a `:`, but you should not make manual requests to this endpoint (this will be responsability of the Pipedrive's [webhook](#webhook)).\n\n### Requests\n\n* `POST /pipedrive/events`\n\nRequest body:\n```json\n{\n  \"current\": {\n    \"id\": 1,\n    \"status\": \"won\"\n  },\n  \"event\": \"updated.deal\"\n}\n```\n\n# Running the tests\n[Jest](https://jestjs.io) was the choice to test the app, to run:\n```\n$ yarn test\n```\nOr:\n```\n$ npm run test\n```\n\n## Coverage report\nYou can see the coverage report inside `tests/coverage`. They are automatically created after the tests run.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaomarr%2Fpipedrive-trello-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoaomarr%2Fpipedrive-trello-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaomarr%2Fpipedrive-trello-webhook/lists"}