All pages
Powered by GitBook
1 of 4

Loading...

Loading...

Loading...

Loading...

Communications and Notifications

Apono outbound webhooks integrations with communications and notifications tools

Slack Outbound Webhooks

Create an outgoing webhook in Apono that will send messages in a Slack channel based on an Apono access requests

The steps below describe how to create an outgoing webhook in Apono that will allow to automatically send messages in Slack from Apono access requests.


Prerequisites

  1. Create a Slack app or use an existing one

  2. Enable incoming webhooks From your Slack . Select Incoming Webhooks, and toggle Activate Incoming Webhooks to on.

  3. Create an incoming webhook - Now that incoming webhooks are enabled, the settings page should refresh and a button called Add New Webhook to Workspace will appear.

    1. Pick a channel that the app will post to, then select Authorize. If you need to add the incoming webhook to a private channel, you must be a member of that channel.

    2. You'll be sent back to your app settings, where you should see a new entry under the Webhook URLs for Your Workspace section. Your webhook URL will look something like this: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX


Create a webhook

Follow these steps to configure a webhook:

  1. On the page, click Add Webhook. The Add Webhook page appears.

  2. Click Request Webhook.

  3. Enter a unique, alphanumeric, user-friendly Request Webhook Name for identifying this webhook.

  4. Click the Status toggle to

The webhook URL must adhere to the following requirements:

  • Uses the HTTPS protocol

  • Does not specify any custom ports

  1. In the Body Template field, construct a JSON body for the webhook payload.

Click View event's payload schema to reveal the payload schema and available data fields. You can also refer to the to read the descriptions of each data field.

  1. From the Triggers dropdown menu, select one or more of the following event triggers, which correspond to Apono access request statuses:

    • RequestCreated

    • RequestApproved

    • RequestExpired

Filters empower admins to control the data transmitted via webhooks, minimizing the amount of data third-party tools receive and reducing unnecessary clutter.

Examples:

  • Send only production requests to your admins' Slack channel.

  • Trigger Okta workflows for events from specific integrations or resource types.

  1. (Optional) In the Timeout in seconds field, enter the duration in seconds to wait before marking the request as failed.

  2. (Optional) Define Response Validators to verify that the response from the webhook meets specified criteria:

    1. Click + Add. A row of settings appears.

For more information about the test, click View Invocation Data. A panel opens revealing the request, response, and other relevant details.

Should your test fail, view these tips to .

  1. Click Save Webhook.

The new webhook appears in the Webhooks table. Active webhooks are preceded by a green dot. Inactive webhooks are preceded by a white dot.

Apono access request logs will be sent to Slack based on the triggers you have selected.


Results

Your webhook should now start sending messages in the webhook Slack channel once triggered:

Active
.
  • From the Method dropdown menu, select POST.

  • In the URL field, enter https//:hooks.slack.com/services/<T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX>. Be sure to replace <T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX> with the incoming webhook URL values.

  • RequestFailed

  • RequestGranted

  • RequestRejected

  • Under Filters, define one or several filter from the listed dropdown menus.

  • Open a ticket in Jira or ServiceNow for manually approved requests.

    Starting with
    $.data.
    , enter the
    Json Path
    of the JSON parameter.
  • In the Expected Values field, enter a value and press the Enter key on your keyboard.

  • Repeat step c to add several expected values.

  • Repeat steps a-d to add multiple response validators.

  • Click Test to generate a test event to trigger your webhook. A Test successful or Test failed response status will appear at the bottom of the page. A successful test will send mock data to the target system.

  • app's management dashboard
    Webhooks
    Webhook Payload Schema Reference
    troubleshoot your webhook
    {
    "text": "New {{ event_type }} from {{ data.requester.name }}",
       "blocks": [
          {
             "type": "header",
             "text": {
                "type": "plain_text",
                "text": "New {{ event_type }} ",
                "emoji": true
             }
          },
          {
             "type": "section",
             "fields": [
                {
                   "type": "mrkdwn",
                   "text": "*Type:*\nPaid Time Off"
                },
                {
                   "type": "mrkdwn",
                   "text": "*Created by:*\n<{{ data.requester.email }}|{{ event_type }}>"
                }
             ]
          },
          {
             "type": "section",
             "fields": [
                {
                   "type": "mrkdwn",
                   "text": "*When:*\n{{ event_time }}"
                }
             ]
          }
       ]
    }  

    Outlook and Gmail (Using Azure Logic App)

    Create an outgoing webhook in Apono that will send emails to Outlook / Gmail based on Apono access requests using Azure Logic App

    An Azure Logic App integration can seamlessly connect with Outlook or Gmail using their respective APIs to send Apono access requests events. By configuring triggers to initiate actions based on specified conditions, the Logic App can efficiently gather the necessary data and format it appropriately for transmission.

    Utilizing Azure's secure connectivity and workflow automation capabilities, this integration ensures reliable and timely delivery of event notifications to users' Outlook or Gmail accounts, streamlining communication and enhancing productivity.


    Prerequisites

    1. An Azure account with subscription (Create an Azure account ).

    2. An Azure workflow Logic App of your choice (Create an Azure logic app ).


    Deploy Azure Logic App Flow

    In Azure portal search for Logic App and choose the Logic App you want to use.

    Under Logic app designer do the following:

    Add workflow trigger fires "When a HTTP request is received"

    Add the following Request Body JSON Schema and save.

    As follow:

    Send request events to Outlook API

    1. Press on the + button to add an action and search for Outlook. Under the Gmail API choose Send an email (V2), as follow:

    1. In Send an email (V2) action, configure the "When a HTTP request is received" trigger values by standing on each value input and press on the lightning icon and choose the relevant value as follow and save:


    Send request events to Gmail API

    1. Press on the + button to add an action and search for Gmail. Under the Gmail API choose Send email (V2), as follow:

    1. In Send email (V2) action, configure the "When a HTTP request is received" trigger values by standing on each value input and press on the lightning icon and choose the relevant value as follow and save:


    Create the webhook

    Follow these steps to configure a webhook:

    1. On the page, click Add Webhook. The Add Webhook page appears.

    2. Click Request Webhook.

    3. Enter a unique, alphanumeric, user-friendly Request Webhook Name for identifying this webhook.

    4. Click the Status toggle to

    The webhook URL must adhere to the following requirements:

    • Uses the HTTPS protocol

    • Does not specify any custom ports

    1. In the Body Template field, construct a JSON body for the webhook payload.

    Click View event's payload schema to reveal the payload schema and available data fields. You can also refer to the to read the descriptions of each data field.

    1. From the Triggers dropdown menu, select one or more of the following event triggers, which correspond to Apono access request statuses:

      • RequestCreated

      • RequestApproved

      • RequestExpired

    Filters empower admins to control the data transmitted via webhooks, minimizing the amount of data third-party tools receive and reducing unnecessary clutter.

    Examples:

    • Send only production requests to your admins' Slack channel.

    • Trigger Okta workflows for events from specific integrations or resource types.

    1. (Optional) In the Timeout in seconds field, enter the duration in seconds to wait before marking the request as failed.

    2. (Optional) Define Response Validators to verify that the response from the webhook meets specified criteria:

      1. Click + Add. A row of settings appears.

    For more information about the test, click View Invocation Data. A panel opens revealing the request, response, and other relevant details.

    Should your test fail, view these tips to .

    1. Click Save Webhook.

    The new webhook appears in the Webhooks table. Active webhooks are preceded by a green dot. Inactive webhooks are preceded by a white dot.

    Apono access request logs will be sent to Outlook and Gmail based on the triggers you have selected.


    Results

    Your webhook should now start sending emails using Azure Logic App to Outlook / Gmail once triggered:

    Teams

    Send Apono access requests data to Teams channels triggered by Apono requests events

    Microsoft Teams is a collaboration platform by Microsoft that integrates chat, video conferencing, file storage, and application integration for streamlined teamwork.

    Leveraging Apono's webhooks solution, you can send requests' data to a dedicated Teams channel as access is requested, granted and revoked.


    Prerequisites

    Active
    .
  • From the Method dropdown menu, select POST

  • In the URL field, enter the Workflow URL for the Logic App. This is located on the Overview page in your Azure Portal

  • RequestFailed

  • RequestGranted

  • RequestRejected

  • Under Filters, define one or several filter from the listed dropdown menus.

  • Open a ticket in Jira or ServiceNow for manually approved requests.

    Starting with
    $.data.
    , enter the
    Json Path
    of the JSON parameter.
  • In the Expected Values field, enter a value and press the Enter key on your keyboard.

  • Repeat step c to add several expected values.

  • Repeat steps a-d to add multiple response validators.

  • Click Test to generate a test event to trigger your webhook. A Test successful or Test failed response status will appear at the bottom of the page. A successful test will send mock data to the target system.

  • here
    here
    Webhooks
    Webhook Payload Schema Reference
    troubleshoot your webhook
    Teams account with an active Subscription (Create an Teams account
    ).
  • Teams chat to send Apono events to (Create a new Teams channel here).

    1. Add an Incoming Webhook to your Teams channel here

      1. Make sure you copy and save the unique webhook URL you get present in the dialog. The URL maps to the channel and you can use it to send information to Teams.


  • Create a webhook

    Follow these steps to configure a webhook:

    1. On the Webhooks page, click Add Webhook. The Add Webhook page appears.

    2. Click Request Webhook.

    3. Enter a unique, alphanumeric, user-friendly Request Webhook Name for identifying this webhook.

    4. Click the Status toggle to Active.

    5. From the Method dropdown menu, select POST.

    6. In the URL field, enter the incoming webhook URL.

    The webhook URL must adhere to the following requirements:

    • Uses the HTTPS protocol

    • Does not specify any custom ports

    1. In the Body Template field, construct a JSON body for the webhook payload.

    Click View event's payload schema to reveal the payload schema and available data fields. You can also refer to the Webhook Payload Schema Reference to read the descriptions of each data field.

    1. From the Triggers dropdown menu, select one or more of the following event triggers, which correspond to Apono access request statuses:

      • RequestCreated

      • RequestApproved

      • RequestExpired

      • RequestFailed

      • RequestGranted

      • RequestRejected

    2. Under Filters, define one or several filter from the listed dropdown menus.

    Filters empower admins to control the data transmitted via webhooks, minimizing the amount of data third-party tools receive and reducing unnecessary clutter.

    Examples:

    • Send only production requests to your admins' Slack channel.

    • Trigger Okta workflows for events from specific integrations or resource types.

    • Open a ticket in Jira or ServiceNow for manually approved requests.

    1. (Optional) In the Timeout in seconds field, enter the duration in seconds to wait before marking the request as failed.

    2. (Optional) Define Response Validators to verify that the response from the webhook meets specified criteria:

      1. Click + Add. A row of settings appears.

      2. Starting with $.data., enter the Json Path of the JSON parameter.

      3. In the Expected Values field, enter a value and press the Enter key on your keyboard.

      4. Repeat step c to add several expected values.

      5. Repeat steps a-d to add multiple response validators.

    3. Click Test to generate a test event to trigger your webhook. A Test successful or Test failed response status will appear at the bottom of the page. A successful test will send mock data to the target system.

    For more information about the test, click View Invocation Data. A panel opens revealing the request, response, and other relevant details.

    Should your test fail, view these tips to troubleshoot your webhook.

    1. Click Save Webhook.

    The new webhook appears in the Webhooks table. Active webhooks are preceded by a green dot. Inactive webhooks are preceded by a white dot.

    Apono access request logs will be sent to Teams based on the triggers you have selected.


    Results

    Your webhook should now start sending request event message to your Teams channel once triggered:

    here
    {
        "type": "object",
        "properties": {
            "email": {
                "type": "string"
            },
            "cc": {
                "type": "string"
            },
            "subject": {
                "type": "string"
            },
            "body": {
                "type": "string"
            }
        }
    }
    {
       "email": "<OUTLOOK/GMAIL_MAILBOX_TO_SEND_THE_EVENTS>",
       "cc": "<LIST_OF_OUTLOOK/GMAIL_MAILBOXS_TO_SEND_THE_EVENTS_SEPARATED_BY_A_SEMICOLON_OR_A_COMMA>",
       "subject": "New {{event_type}} request event from Apono made by {{data.requester.name}}",
       "body": "<p>We are excited to inform you about a new event request that requires your attention</p><p>Event Type: {{event_type}}</p><p>Event Time: {{event_time}}</p><p>Integration: {{data.access_groups.[0].integration.name}}</p><p>Requester Name: {{data.requester.name}}</p><p>Requester Email: {{data.requester.email}}</p>"
    }
    {
          "type":"message",
          "attachments":[
             {
                "contentType":"application/vnd.microsoft.card.adaptive",
                "contentUrl":null,
                "content":{
                   "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
                   "type":"AdaptiveCard",
                   "version":"1.2",
                   "body":[
                      {
                         "type": "TextBlock",
                         "size": "medium",
                         "weight": "bolder",
                         "text": "New {{ event_type }} from {{ data.requester.name }}",
                         "style": "heading",
                         "wrap": true
                      },
                      {
                         "type": "TextBlock",
                         "text": "We are excited to inform you about a new event request that requires your attention",
                         "wrap": true
                      },
                      {
                         "type": "FactSet",
                         "facts": [
                            {
                               "title": "Event Type:",
                               "value": "{{event_type}}"
                            },
                            {
                               "title": "Event Time:",
                               "value": "{{event_time}}"
                            },
                            {
                               "title": "Integration:",
                               "value": "{{data.access_groups.[0].integration.name}}"
                            },
                            {
                               "title": "Requester Name:",
                               "value": "{{data.requester.name}}"
                            },
                            {
                               "title": "Requester Email:",
                               "value": "{{data.requester.email}}"
                            }
                         ]
                      }
                   ]
                }
             }
          ]
       }