Common Webhooks
This page contains tutorials for configuring some common webhook integrations.
Jira
In this tutorial, we are going to create a webhook that automatically creates an issue in a Jira board every time a new feedback is submitted to Astuto. However, there are many more Jira integrations you can create (e.g. by changing the Jira endpoint URL or the webhook's trigger).
To further customize your Jira integration or create new ones, we suggest to read Jira REST API for a comprehensive list of endpoints and parameters.
To create a webhook for Jira integration, we need to create a Jira API token.
- Navigate to Jira API tokens page, click "Create API token" and fill "Name" and "Expires on" fields. Then, click "Create" and take note of your API token.
- Follow the instructions of section "Supply basic auth headers" of this page to generate a base64 encoding of your email+token. Take note of the resulting token.
- From Jira project dashboard, click "Projects" dropdown, then click "View all projects". Take note of the project key.
- Navigate to your Astuto feedback space, then go to "Site settings > Webhooks" and click "New"
- Fill the form with the following values and click "Save":
- Name: a name of your choice
- Description: a description of your choice (optional)
- Trigger: "New post" (you can change it to suit your needs)
- HTTP method: POST
- URL:
https://<YOUR_JIRA_DOMAIN>.atlassian.net/rest/api/3/issue
- HTTP body: (change to suit your needs)
{
"fields": {
"project": {
"key": "<YOUR_PROJECT_KEY>"
},
"summary": "{{ post.title | escape_json }}",
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "{{ post.description | escape_json }}",
"type": "text"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Click here",
"marks": [
{
"type": "link",
"attrs": {
"href": "{{ post.url }}"
}
}
]
}
]
}
]
},
"issuetype": {
"name": "Task"
}
}
} - Header 1 key:
Authorization
- Header 1 value:
Basic <BASE64_ENCODED_TOKEN>
- Header 2 key:
Content-Type
- Header 2 value:
application/json
- Test your newly configured webhook. If everything is okay, you can Enable the webhook.
Slack
In this tutorial, we are going to create a webhook that automatically sends a message to a Slack channel every time a new feedback is submitted to Astuto. However, there are many more Slack integrations you can create (e.g. by changing the Slack endpoint URL or the webhook's trigger).
To further customize your Slack integration or create new ones, we suggest to read Slack REST API for a comprehensive list of endpoints and parameters.
To create a webhook for Slack integration, we need to create a Slack app and add it to a Slack workspace.
- Navigate to Slack API Dashboard, click "Create New App", choose "From scratch", fill "App Name" and choose the app's workspace
- In the page of your newly created Slack app, on the left sidebar, click "OAuth & Permissions" and add the
chat:write
permission under "Scopes > Bot Token Scopes" - Click "Install App to Workspace" and grant authorization to the app
- Copy the "Bot User OAuth Token" and store it in a safe place
- Navigate to your Slack worskpace. In the left sidebar, right click on the channel you want to send messages to and click "View channel details". Take note of "Channel ID".
- Navigate to your Astuto feedback space, then go to "Site settings > Webhooks" and click "New"
- Fill the form with the following values and click "Save":
- Name: a name of your choice
- Description: a description of your choice (optional)
- Trigger: "New post" (you can change it to suit your needs)
- HTTP method: POST
- URL:
https://slack.com/api/chat.postMessage
- HTTP body: (change to suit your needs)
{
"channel": "<SLACK_CHANNEL_ID>",
"text": "{{ post_author.full_name }} posted new feedback '{{ post.title | escape_json }}'! Link: {{ post.url }}"
} - Header 1 key:
Authorization
- Header 1 value:
Bearer <Your Bot User OAuth Token>
- Header 2 key:
Content-Type
- Header 2 value:
application/json; charset=utf-8
- Test your newly configured webhook. If everything is okay, you can Enable the webhook.
GitHub
In this tutorial, we are going to create a webhook that automatically creates a new GitHub issue in a specific GitHub repository every time a new feedback is submitted to Astuto. However, there are many more GitHub integrations you can create (e.g. by changing the GitHub endpoint URL or the webhook's trigger).
To further customize your GitHub integration or create new ones, we suggest to read GitHub REST API for a comprehensive list of endpoints and parameters.
To create a webhook for GitHub integration, we need to create a GitHub personal access token (PAT).
- Navigate to GitHub Developer Settings, click "Personal access tokens" and then click "Fine-grained tokens"
- Click "Generate new token"
- Fill in the following fields: "Token name", "Resource owner", "Expiration", "Repository access", "Permissions". In particular, under "Permissions > Repository permissions", set access of "Issues" to "Read and Write".
- Click "Generate token" and take note of the personal access token generated
- Navigate to your Astuto feedback space, then go to "Site settings > Webhooks" and click "New"
- Fill the form with the following values and click "Save":
- Name: a name of your choice
- Description: a description of your choice (optional)
- Trigger: "New post" (you can change it to suit your needs)
- HTTP method: POST
- URL:
https://api.github.com/repos/<OWNER>/<REPOSITORY>/issues
- HTTP body: (change to suit your needs)
{
"title": "{{ post.title | escape_json }}",
"body": "{{ post.description | escape_json }}"
} - Header 1 key:
Authorization
- Header 1 value:
Bearer <YOUR_TOKEN>
- Header 2 key:
accept
- Header 2 value:
application/vnd.github+json
- Header 3 key:
X-GitHub-Api-Version
- Header 3 value:
2022-11-28
Trello
In this tutorial, we are going to create a webhook that automatically creates a new Trello Card in a specific Trello List every time a new feedback is submitted to Astuto. However, there are many more Trello integrations you can create (e.g. by changing the Trello endpoint URL or the webhook's trigger).
To further customize your Trello integration or create new ones, we suggest to read Trello REST API for a comprehensive list of endpoints and parameters.
To create a webhook for Trello integration, we need to create a Trello Power-Up.
- Navigate to Trello Power-Up Dashboard and click "New"
- Fill the following fields: "New Power-Up or Integration", "Workspace", "Email", "Support Contact" and "Author"; then click "Create"
- If not already there, navigate to the "API key" page through the left sidebar, then click "Generate a new API key". Take note of the "API key".
- Navigate to the following URL, replacing
<POWER_UP_NAME>
andYOUR_API_KEY
with the chosen Power-Up name and generated API key:https://trello.com/1/authorize?expiration=never&name=<POWER_UP_NAME>&scope=read,write&response_type=token&key=<YOUR_API_KEY>
- A page should appear that asks for your permission to add the newly created Power-Up to your account. Click "Allow".
- A new page with a token should appear. Take note of the token.
- Navigate to your Trello Board. Click on a Card of the List you want to send Astuto feedback to. From the Card, on the right sidebar, click "Share > Export JSON". Take note of the "idList" in the JSON.
- Navigate to your Astuto feedback space, then go to "Site settings > Webhooks" and click "New"
- Fill the form with the following values and click "Save":
- Name: a name of your choice
- Description: a description of your choice (optional)
- Trigger: "New post" (you can change it to suit your needs)
- HTTP method: POST
- URL:
https://api.trello.com/1/cards?key=<API_KEY>&token=<TOKEN>
(substitute<API_KEY>
and<TOKEN>
with your specific values) - HTTP body: (change to suit your needs)
{
"name": "{{ post.title | escape_json }}",
"desc": "{{ post.description | escape_json }}",
"urlSource": "{{ post.url }}",
"idList": "<YOUR_ID_LIST>"
} - Header 1 key:
Content-Type
- Header 1 value:
application/json
- Test your newly configured webhook. If everything is okay, you can Enable the webhook.