hubspot_api_key = ENV["HUBSPOT_API_KEY"] hubspot_portal_id = ENV["HUBSPOT_PORTAL_ID"] if hubspot_api_key.present? && hubspot_portal_id.present? Hubspot.configure( hapikey: hubspot_api_key, portal_id: hubspot_portal_id ) end