use github with webhooks to trigger a runbook

Jyoti Kothiyal (EXTERNAL) 121 Reputation points
2022-08-15T06:54:11.813+00:00

how to intergrate a webhooks with github to trigger a automation account runbook

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,110 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Carlos Villagomez 1,031 Reputation points Microsoft Employee
    2022-08-15T17:52:33.66+00:00

    @Jyoti Kothiyal (EXTERNAL)

    Thanks for your post! I have done some research on my end and discovered some documentation that should help guide you through the process of integrating Webhooks via GitHub to start a runbook in Azure Automation:

    External services, for example, Azure DevOps Services and GitHub, can start a runbook in Azure Automation. To do this type of startup, the service uses a webhook via a single HTTP request. Use of a webhook allows runbooks to be started without implementation of a full Azure Automation feature.

    The following document here can be used as a reference point on how to get started for allowing an external service (e.g. GitHub) to start a particular runbook in Azure Automation through a single HTTP request.

    I also found the following guide with more information on how Webhook Data from GitHub is passed to an Azure Automation Runbook and how it can be parsed using a sample Runbook included here.

    You can also reference the official GitHub documentation here on how to configure your server to receive webhook payloads.

    Please let me know if this helps answer your question or if you require further assistance and I'll be happy to assist you further.

    Thanks!
    Carlos V.

    2 people found this answer helpful.

  2. Maxim Sergeev 6,566 Reputation points Microsoft Employee
    2022-08-15T17:12:54.137+00:00

    Hi there,

    I assume you want to run GitHub Actions that execute Azure Automation Runbooks. It's pretty simple

    1) Create a runbook
    2) Create a webhook for the runbook, follow the instructions https://learn.microsoft.com/en-us/azure/automation/automation-webhooks?tabs=portal#create-a-webhook
    3) In the GitHub Actions use the workflow webhook action, generated in the step 2 https://github.com/marketplace/actions/workflow-webhook-action


  3. David Broggy 5,681 Reputation points MVP
    2022-08-16T21:33:18.757+00:00

    Hi JyotiKothiyalEXTERNAL-1875!

    Is there any reason you can't do this with a logic app?
    Are you building more code around this solution?
    Using logic apps would make your solution 'codeless'.
    reference:
    create-webhook-trigger