• Documentation
  • Workato Blog
  • Product Blog
  • Return to Workato
  • Login
  • Automation Institute
  • Documentation
  • Community Forums
New Topic
Discussions Recipe Building Recipe Building Questions
S

Saul Macht

started a topic over 5 years ago
Answered

How can I trigger a Workato recipe when a AWS Simple Notification Service (SNS) notification is published to a topic?

Hi, I was just wondering if it would be possible for me to trigger a Workato recipe to execute based on a new published notification on a AWS SNS topic. I see that it is possible to post to a HTTP endpoint from AWS SNS by creating a new subscription within SNS.


As such, I was wondering if I can use this feature of AWS SNS to post to a Workato HTTP endpoint. Please let me know if this is possible! Thanks!


Best Answer
B
Bryan Yap said over 5 years ago

Hi Saul, this is definitely possible and will involve the following steps:

  1. Create Workato Recipe with HTTP Webhook Endpoint like at https://www.workato.com/recipes/626726. Give the HTTP Webhook trigger an `Event name` and take note for the `Target URL` which you will need to pass into the AWS SNS Topic Subscription.

    image


  2. Start the recipe. This is important as in order to successfully subscribe to a topic in SNS, the SNS service will first send us a HTTP POST request with a `SubscribeURL` which we are expected to access via a HTTP GET Request (which can be done via a browser).
  3. Create AWS SNS Topic.

    image


  4. Create subscription to SNS Topic using the `HTTPS` protocol and the `Endpoint` specified in the Workato recipe.

    image


  5. Access the Workato recipe logs and retrieve the `SubscribeURL` from AWS SNS which can be found in the first job report. This job should be generated immediately after creating the subscription.

    image

  6. Copy and paste the `SubscribeURL` into a new Web Browser tab/window and access the page. You should be directed to a page which returns an XML message indicating successful subscription.

  7. You have successfully subscribed to the AWS SNS Topic with your Workato recipe. The only step left now is to configure the `Webhook payload example` in the Webhook trigger of your recipe. You may do so by sending a test message to your SNS Topic and retrieving the response from the recipe job report and using that within the `Webhook payload example`.

    Job report:

    image


    Webhook trigger configuration:

    image


Answer

Bryan Yap

said over 5 years ago

Hi Saul, this is definitely possible and will involve the following steps:

  1. Create Workato Recipe with HTTP Webhook Endpoint like at https://www.workato.com/recipes/626726. Give the HTTP Webhook trigger an `Event name` and take note for the `Target URL` which you will need to pass into the AWS SNS Topic Subscription.

    image


  2. Start the recipe. This is important as in order to successfully subscribe to a topic in SNS, the SNS service will first send us a HTTP POST request with a `SubscribeURL` which we are expected to access via a HTTP GET Request (which can be done via a browser).
  3. Create AWS SNS Topic.

    image


  4. Create subscription to SNS Topic using the `HTTPS` protocol and the `Endpoint` specified in the Workato recipe.

    image


  5. Access the Workato recipe logs and retrieve the `SubscribeURL` from AWS SNS which can be found in the first job report. This job should be generated immediately after creating the subscription.

    image

  6. Copy and paste the `SubscribeURL` into a new Web Browser tab/window and access the page. You should be directed to a page which returns an XML message indicating successful subscription.

  7. You have successfully subscribed to the AWS SNS Topic with your Workato recipe. The only step left now is to configure the `Webhook payload example` in the Webhook trigger of your recipe. You may do so by sending a test message to your SNS Topic and retrieving the response from the recipe job report and using that within the `Webhook payload example`.

    Job report:

    image


    Webhook trigger configuration:

    image


Login to post a comment

Still can't find your solution?

Send us a ticket, we will try our best to assist you with your problem

Documentation
Developer's Library
Tutorials
eBooks
Product Hour
Product Blog
Workato Blog
Product updates
Customer Stories
© Workato 2022   Privacy   Terms   +1 (844) 469-6752
  • Documentation
  • Workato Blog
  • Product Blog
  • Solutions
  • Forums
  • Tickets
  • Log in
  • Return to Workato
Topic views count