Webhook Setup
1. Add the Sunshine Conversations Integration
The first thing you need to do is add the Sunshine Conversations integration
to your app, you do this by creatign a YAML file in you app that specifies
the Sunshine Conversations integration element.
Here is an example: save the following YAML to a file called
sunshine_conversations.yaml
in your app's integration/
directory.
id: sunshine-conversations
type: meya.zendesk.sunshine_conversations.integration
key_id: (@ vault.sunshine_conversations.api_key_id )
secret: (@ vault.sunshine_conversations.api_secret )
Properties:
- id: this is optional, if you do not provide this then the id of the
integration will be the dot path of the YAML file e.g.
integration.sunshine_conversations
. - type: the dot path of the integration element in the SDK.
- key_id: this is your Sunshine Conversation app's API key ID.
- secret: this is your Sunshine Conversation app's API secret.
Next you need to get your Sunshine Conversation app's API key_id and
secret:
- Download your app's vault file:
meya vault download --file vault.secrets.yaml
- Go the the Sunshine Conversations Console
- Select an existing app or create a new app.
- Go to the Settings tab.
- Scroll to the API Keys section.
- Select or create a new API Key.
- Copy the ID of the API key and add it to your vault file under the
sunshine_conversations.api_key_id
key. - Copy the SECRET of API key and add it to your vault file under the
sunshine_conversations.api_secret
key. - Upload your app's vault file:
meya vault upload --file vault.secrets.yaml
- Push your app:
meya push
2. Get Your Webhook URL
Next you need to run meya webhooks
to get a list of webhooks for all the
integrations you've added to your app. Search for Sunshine Conversations webhook
and copy the webhook URL.
3. Add a Webhook to Your Sunshine Conversations App
- Go the the Sunshine Conversations Console
- Go to the Integrations tab.
- Search for the Webhooks integrations.
- In the Webhooks integration page, click on Connect for a new integration,
or Configure for and existing webhook. - Click on Create a webhook.
- Paste the webhook URL you copied earlier into the Webhook URL form.
- Select v1.1 in the Version drop down.
- Check:
- All basic triggers
- User typing
- Click Create webhook
You should now be able to add other integration e.g. Web Messenger, Telegram,
Slack etc.
Element details
type: meya.zendesk.sunshine_conversations.integration
class: SunshineConversationsIntegration
path: /meya/zendesk/sunshine_conversations/integration/integration.py
signature: -
Fields
field | description | required | signature | default | type |
---|---|---|---|---|---|
spec | Override the original spec for this element. | ○ | ○ | null | Spec |
enabled | Enables the integration, allowing it to process events and HTTP/WS entries. | ○ | ○ | true | bool |
filter | Specifies the GridQL to filter rx_sub , rx , tx , tx_pub entries. Check the integration filtering guidefor more info. | ○ | ○ | rx_sub: true rx: true tx: true tx_pub: true | IntegrationFilter |
verify_token | The token to be verified for each incoming request. You need to add the verify_token=YOUR_TOKEN query parameter to integration's webhook URL. | ○ | ○ | null | str |
max_attachment_size | Controls maximum attachment size supported by the integration in bytes. | ○ | ○ | null | int |
markdown | The markdown features that are supported by this integration. Check the Markdown guide for more info. | ○ | ○ | false | list bool |
typing | When set to false , all typing indicators received by the integration will be ignored. | ○ | ○ | true | bool |
app_id | ◉ | ○ | str | ||
key_id | ◉ | ○ | str | ||
secret | ◉ | ○ | str | ||
region | ○ | ○ | "us" | SunshineConversationsRegion | |
lifecycle_events | ○ | ○ | true | bool | |
Usage reference
Basic
type: meya.zendesk.sunshine_conversations.integration
app_id: STRING
key_id: STRING
secret: STRING
Full
type: meya.zendesk.sunshine_conversations.integration
spec:
type: STRING
data:
STRING: ANY
timeout: 123
trigger_when: ANY
enabled: false
filter:
rx_sub: STRING
rx: STRING
tx: STRING
tx_pub: STRING
verify_token: STRING
max_attachment_size: 123
markdown:
- format|linkify|breaks|typographer
typing: false
app_id: STRING
key_id: STRING
secret: STRING
region: us|eu
lifecycle_events: false