How to change the "created_by" property to the value of a form field

I am using an automator plugin to receive a webhook with information that will be used to create a Gravity Forms entry. Part of the webhook info will include the user ID of the related user. I need to set the created_by property the corresponding user. I imagine that the best way to do this would be to

  1. Add a “User ID” field to the form
  2. Set the field as the “created_by” property using the gform_after_submission hook.

If this is possible, can someone help me to set up the hook correctly? Thank you!!