0

We're not seeing external ID included in item.update webhook. The documentation says we should be included:

item.update: When an item is updated. Provides parameter "item_id", "item_revision_id" and "external_id".

The parameters we do see (via requestbin) are:

item_id: 12345
hook_id: 9875
type: item.update
item_revision_id: 2

What do we need to do to have external_id included in the webhook event? Or am I misreading the documentation?

dmulter
  • 2,608
  • 3
  • 15
  • 24
Richard Dallaway
  • 4,250
  • 1
  • 28
  • 39

3 Answers3

2

Podio documentation is up-to-date and external_id parameter is sent for item.create and item.update hooks. In order to have it sent, item needs to have it :)

So, if you just create item from Podio web, that item won't have any external_id. But if you create item via API and specify external_id then it will be there. Here is full example in Ruby:

attr = {:fields => { :title => 'Created with external ID'},
        :external_id => 'exernal_id_for_demo' }
item = Podio::Item.create(app_id, attr)

Then webhook item.create will be:

item_id: 720040614
item_revision_id: 0
type: item.create
hook_id: 7243151
external_id: exernal_id_for_demo
Pavlo - Podio
  • 2,003
  • 2
  • 10
  • 19
0

I don't think Podio provide external_id with the hook data. What you should do is do another call 'Get item revision difference' with item_revision_id as the revision_to_id. This will give you the current revision details. And you can find the external_id and field_id in this response.

Nivin V Joseph
  • 12,042
  • 2
  • 15
  • 24
0

Rather than receive the external_id, we can register a hook to be triggered only against a particular field. This way, the URL that's triggered can encode which external_id was involved.

The gotcha is that you can't do this from the management interface, but you can from the API. For example, using HTTPie, if we had a field with an id of 123...

 http POST https://api.podio.com/hook/app_field/123/ \
    url=http://your.endpont/123 
    type=item.update 
    'Authorization: OAuth2 token-here'

...which returns the hook_id, and you'd validate the hook as usual.

Via: https://stackoverflow.com/a/39782472/154248

Richard Dallaway
  • 4,250
  • 1
  • 28
  • 39