Pastel allows you to easily collect client feedback on websites you're building. But to make the most of that feedback, you need to be able to easily act on it. Exporting Pastel comments to a custom webhook is an easy way to integrate Pastel into your custom workflow.
Customizable Webhook Integration
To start getting your custom webhook set up, head on over to any canvas. If you don't have a canvas set up yet, you can get set up in under a minute over at https://usepastel.com/dashboard.
Click on the circle avatar icon located on the far right side of the canvas footer. A menu will pop up. Select the "export feedback" button.
Then select custom webhook from the available options and follow the prompts.
You'll be prompted to enter the URL of your webhook endpoint that Pastel will POST to.
Once you've saved your webhook URL, you can begin exporting. You can select all comments, filter by active or resolved, or just select the comments you'd like to export one by one.
Once you click export, Pastel will make a JSON-encoded POST request to the endpoint URL you entered previously, with data for all the comments you'd like to export. Pastel expects that a successful response should have the 200 OK HTTP status code, and will return an error if it receives any other status code. Here's a sample request:
{
"comments": [
{
"body": "This button needs to be blue",
"pageURL": "https://your-website.com/",
"commentURL": "http://usepastel.com/link/000/comment/123/",
"screenshotURL": "https://s3.amazonaws.com/pastel.prod/screenshot/7Cn1lalasdfp7XHRkaiY.jpg",
"isResolved": false,
"status": "active",
"metadata": {
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36",
"browser": {
"name": "Chrome",
"version": "67.0.3396.79",
"major": "67"
},
"engine": {
"version": "537.36",
"name": "WebKit"
},
"os": {
"name": "Mac OS",
"version": "10.13.4"
},
"device": {},
"cpu": {},
"window": {
"height": 696,
"width": 1490,
"devicePixelRatio": 1,
"pageXOffset": 0,
"pageYOffset": 0
}
},
"user": {
"id": 3,
"name": "Cameron Client",
"isGuest": true,
"avatarURL": "https://s3.amazonaws.com/pastel.prod/avatar/lP7HMn2sfguvObg5t.jpg"
},
"canvas": {
"id": 295,
"title": "Our Awesome New Website",
"thumbnailURL": "https://s3.amazonaws.com/pastel.prod/screenshot/7Cn1lalaRSp7XHRkaiY.jpg",
"canvasURL": "http://usepastel.com/link/000/"
}
},
{
"body": "Can we add a bit more magic to this form?",
"pageURL": "https://your-website.com/signup",
"commentURL": "http://usepastel.com/link/000/comment/124/",
"screenshotURL": "https://s3.amazonaws.com/pastel.prod/screenshot/7Cnaaaasdfp7XHRkaiY.jpg",
"isResolved": false,
"status": "in-review",
"metadata": {
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36",
"browser": {
"name": "Chrome",
"version": "67.0.3396.87",
"major": "67"
},
"engine": {
"version": "537.36",
"name": "WebKit"
},
"os": {
"name": "Mac OS",
"version": "10.13.4"
},
"device": {},
"cpu": {},
"window": {
"height": 641,
"width": 1130,
"devicePixelRatio": 1,
"pageXOffset": 0,
"pageYOffset": 0
}
},
"user": {
"id": 36,
"name": "Harry Potter",
"isGuest": true,
"avatarURL": "https://secure.gravatar.com/avatar/74035422d2b09ac72d4ddf5eece47415?s=460&d=retro"
},
"canvas": {
"id": 295,
"title": "Our Awesome New Website",
"thumbnailURL": "https://s3.amazonaws.com/pastel.prod/screenshot/7Cn1aRSp7XHRkailalY.jpg",
"canvasURL": "http://usepastel.com/link/000/"
}
},
{
"body": "Note to self - replace with updated copy.",
"pageURL": "https://your-website.com/new-landing-page",
"commentURL": "http://usepastel.com/link/000/comment/125/",
"screenshotURL": "https://s3.amazonaws.com/pastel.prod/screenshot/7Cnaaaasdfp7XHRkaiY.jpg",
"isResolved": true,
"status": "resolved",
"metadata": {
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
"browser": {
"name": "Chrome",
"version": "67.0.3396.99",
"major": "67"
},
"engine": {
"version": "537.36",
"name": "WebKit"
},
"os": {
"name": "Mac OS",
"version": "10.13.4"
},
"device": {},
"cpu": {},
"window": {
"height": 752,
"width": 1430,
"devicePixelRatio": 1,
"pageXOffset": 0,
"pageYOffset": 0
}
},
"user": {
"id": 12,
"name": "Your Name",
"isGuest": false,
"avatarURL": "https://s3.amazonaws.com/pastel.prod/avatar/lP7HMn2WmuvObg5t.jpg"
},
"canvas": {
"id": 295,
"title": "Our Awesome New Website",
"thumbnailURL": "https://s3.amazonaws.com/pastel.prod/screenshot/7Cn1aRSp7XHRkaiY.jpg",
"canvasURL": "http://usepastel.com/link/000/"
}
}
]
}
That's it! You're all set to start knocking off tasks in your own custom workflow.
If you have any questions, don't hesitate to reach out in the chat on the right or by email at hello@usepastel.com.