This paper proposes a stochastic optimization problem for local integrated hydrogen-power energy systems. In the proposed model, the integrated system tries to reduce the day-ahead operation costs using dispatchable resources, renewable energy resources, battery energy storage systems, demand response programs, and energy trading with the upstream network. Also, the integrated system is able to transact electricity with the upstream network to get more benefits. When the generation of renewable resources is high, the integrated system can convert the surplus electricity to hydrogen by power-to-gas units. The generated hydrogen can be sold to different industries or stored in the hydrogen tank storage. During peak hours, the stored hydrogen can be imported into the gas-to-power unit to generate the required electricity. The sector coupling between electricity and hydrogen provides more flexibility for integrated systems and is an effective solution to control the uncertainty of renewable energy resources in order to increase the power and energy flexibilities. The simulation results show that the proposed sector coupling provides the opportunity for electricity and hydrogen trading for integrated system. The benefit of the integrated system by electricity and hydrogen trading with the upstream network and different industries are $ 88.39, and $ 6846, respectively.