How facebook.py works?

I’m working on an action that can take image from user (via Facebook Messenger which I have already figured out how to integrate). I need to know how facebook.py works and how can I get the image url from FacebookInputChannel to tracker so that I can take the image from tracker abd process the image in action.py

The basic workflow is

  1. User sends message to Facebook
  2. Facebook forwards message to our web hook (facebook.py)
  3. Rasa Open Source handles message (predicting and running next action)
  4. Rasa Open Source sends response back to Facebook
  5. Facebook forwards message to user

The format of the Facebook payload should be documented here. An alternative would be to add a print(payload) statement to your custom channel and then send a message with picture to Facebook. By looking at printed statement you can see where your picture goes in the event payload.