You can use "Custom" activity to return a value and then either use it directly in the subsequent activities or add "Set variable" activity to save the value to pipeline variable.