Select to view content in your preferred language

Trigger AGOL Notebook from AGOL Webhook

335
3
Jump to solution
06-06-2024 05:27 AM
KenBragg
New Contributor III

Hi folks

I have a webhook on an AGOL Hosted Feature Service that triggers on Add, Update delete. This works fine. 

I want to trigger an AGOL Notebook script from this webhook but there does not seems to be any execute notebook URL available for AGOL (only for ArcGIS Enterprise).  Am I missing something? Or any thoughts on a work-around.

My current work-around is to trigger and FME Server automation via webhook which executes the necessary work.

Thanks

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
ChristopherCounsell
MVP Regular Contributor

I don't believe Notebooks can be triggered by Webooks.

What you can do is Schedule a Notebook task, up to every 15 minutes.

https://doc.arcgis.com/en/arcgis-online/create-maps/prepare-a-notebook-for-automated-execution.htm

*scheduling does incur a small credit cost, so run it less frequently if you need

Then to have it line up with 'triggers' add a field to flag if the record has been processed. e.g. 'processed' = no. Use this field to filter out records to be processed (within the script or by pointing at a filtered View).

Then when the record is processed, the notebooks edits it to processed=yes, so it's excluded from future runs.

You could do similar with change tracking for adds/updates/deletes but the manual flag is easier to reprocess in the event the notebook fails.

View solution in original post

3 Replies
RobertAnderson3
MVP Regular Contributor

I unfortunately don't have anything to add on the how to do this but this is a really cool idea so I want to follow the thread and see if anyone knows how to do this.

0 Kudos
ChristopherCounsell
MVP Regular Contributor

I don't believe Notebooks can be triggered by Webooks.

What you can do is Schedule a Notebook task, up to every 15 minutes.

https://doc.arcgis.com/en/arcgis-online/create-maps/prepare-a-notebook-for-automated-execution.htm

*scheduling does incur a small credit cost, so run it less frequently if you need

Then to have it line up with 'triggers' add a field to flag if the record has been processed. e.g. 'processed' = no. Use this field to filter out records to be processed (within the script or by pointing at a filtered View).

Then when the record is processed, the notebooks edits it to processed=yes, so it's excluded from future runs.

You could do similar with change tracking for adds/updates/deletes but the manual flag is easier to reprocess in the event the notebook fails.

KenBragg
New Contributor III

Thanks - kind of what I thought.  Really too bad Notebooks can't be triggered this way but this seems to be the case.

0 Kudos