Skip to main content
Question

Issues with ArcGIS Online webhook

  • December 7, 2020
  • 5 replies
  • 239 views

bracken
Contributor
Forum|alt.badge.img+1

To start out, I am new to FME and to webhooks (or web mapping/web development in general). I am trying to set up a webhook to send an email when a user updates or creates a feature in an ArcGIS Online feature service. I have been able to successfully set up webhooks with Survey123 using the process in this article. Webhooks seem to be a relatively new feature in AGOL. I have only found this Esri article, and it was just from August of this year.

 

The problem I'm having is that I am able to send the webhook to webhook.site and Integromat (as is described in the Esri article linked above), but when I the webhook sends the payload to the webhook trigger in FME server, the log file doesn't give me the JSON that I get from webhook.site and Integromat, I get the following string of characters:

cGF5bG9hZD1bDQogIHsNCiAgICAibmFtZSIgOiAiU3VydmV5MTIzVGVzdFdlYmhvb2siLCANCiAgICAibGF5ZXJJZCIgOiAwLCANCiAgICAib3JnSWQiIDogInBBMm5FVm5CNnRxdXhnT1ciLCANCiAgICAic2VydmljZU5hbWUiIDogInN1cnZleTEyM19mZTBiNjk1YzRjMmM0Mzg2YTAyNTU4ODM3N2JhMjM4MiIsIA0KICAgICJsYXN0VXBkYXRlZFRpbWUiIDogMTYwNzM1ODY4NTk5OSwgDQogICAgImNoYW5nZXNVcmwiIDogImh0dHBzJTNhJTJmJTJmc2VydmljZXMuYXJjZ2lzLmNvbSUyZnBBMm5FVm5CNnRxdXhnT1clMmZhcmNnaXMlMmZyZXN0JTJmc2VydmljZXMlMmZzdXJ2ZXkxMjNfZmUwYjY5NWM0YzJjNDM4NmEwMjU1ODgzNzdiYTIzODIlMmZGZWF0dXJlU2VydmVyJTJmZXh0cmFjdENoYW5nZXMlM2ZzZXJ2ZXJHZW5zJTNkJTViMjYzMzcxNDAlMmMyNjMzNzE1MCU1ZCUyNmFzeW5jJTNkdHJ1ZSUyNnJldHVyblVwZGF0ZXMlM2RmYWxzZSUyNnJldHVybkRlbGV0ZXMlM2RmYWxzZSUyNnJldHVybkF0dGFjaG1lbnRzJTNkZmFsc2UiLCANCiAgICAiZXZlbnRzIiA6IFsNCiAgICAgICJGZWF0dXJlc0NyZWF0ZWQiDQogICAgXX0NCl0=

 

With setting up the webhook with Survey123, the payload is JSON, so it is easy to parse. I have no idea what is going on here.

I also tried to set up the webhook using a topic, but when I try to run topics, I don't think our topic monitoring is working, because it shuts down after running for about 1 minute and says that "Monitoring has been stopped. There was an error connecting to monitoring service."

We are currently running FME Server 2020.1.0.1.

 

Anyone have any advice for me?

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

bracken
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • 4 replies
  • December 7, 2020

I haven't tested it yet, but I just found a transformer in 2020.1.0.0 that will decode the ArcGIS Online webhook. There is a video introducing the transformer and a link to download a workspace with the transformer. The transformer is at https://hub.safe.com/publishers/safe-lab/transformers/arcgisonlinewebhookdecoder#description and the video link (and location of transformer) are in the comments tab of that transformer's page.


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2940 replies
  • December 7, 2020

It should not be very difficult.

No server 2020 experience, but do have Survey123 webhooks connected in 2019.

Steps:

  • Create a simple workspace:
    • Text reader transformer. Any text file will do.
    • Read Whole File at Once = yes.
    • Make sure the source file is a published parameter.
    • Connect a Logger.
  • Publish to server:
    • Check job submitter, click "Edit..."
    • Make sure the Source parameter is selected.
  • In Server:
    • Find the published workspace and open it.
    • Click "Advanced".
    • Click "Create a Webhook"
    • Click "OK"
    • Click "Download" to backup the token.
    • Select the URL under "Authorization with Query String".
  • In Survey123:
    • Open Survey.
    • Go to settings.
    • Create webhook, configure, paste URL.
    • Add a feature with the Survey.
  • In FME Server
    • Check if the job did run.
    • Open the log and look for LOGGER. The Payload will be there.

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2940 replies
  • December 7, 2020

I haven't tested it yet, but I just found a transformer in 2020.1.0.0 that will decode the ArcGIS Online webhook. There is a video introducing the transformer and a link to download a workspace with the transformer. The transformer is at https://hub.safe.com/publishers/safe-lab/transformers/arcgisonlinewebhookdecoder#description and the video link (and location of transformer) are in the comments tab of that transformer's page.

I tested this with your response and it returns readable json, so probably the way to go.


bracken
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • 4 replies
  • December 14, 2020

I tested this with your response and it returns readable json, so probably the way to go.

Thanks Niels.


bracken
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • 4 replies
  • December 15, 2020

I haven't tested it yet, but I just found a transformer in 2020.1.0.0 that will decode the ArcGIS Online webhook. There is a video introducing the transformer and a link to download a workspace with the transformer. The transformer is at https://hub.safe.com/publishers/safe-lab/transformers/arcgisonlinewebhookdecoder#description and the video link (and location of transformer) are in the comments tab of that transformer's page.

I only had one hitch with the workflow attached to the video at https://hub.safe.com/publishers/safe-lab/transformers/arcgisonlinewebhookdecoder#description, I was not able to use the ArcGISOnlineTokenGetter transformer, because my agency has a SAML login. So Laura at Safe Software helped me change the workflow so it worked for me. I have attached that new workflow.