Forum Discussion
Web.content error when combining queries
It's because you are using a variable as a URL. If these are all google sheet then i assume they all have the base URL of: https://docs.google.com/
you can try removing this from the URL first.
URLPre = Table.ReplaceValue(BRON,"https://docs.google.com/","",Replacer.ReplaceText,{"Column2"})
In web.contents you just the url as "https://docs.google.com/". Then you append the rest using RelativePath
SourceAccessKey = Xml.Tables(Web.Contents("https://docs.google.com/", [RelativePath = URLAuth, Query=[accessKey=Text.From(AccessKeyParam)]]))
let
Bron = Csv.Document(Web.Contents("****GoogleSheetLink****"),[Delimiter=",", Columns=4, Encoding=1252, QuoteStyle=QuoteStyle.None]),
URLPre = Table.ReplaceValue(BRON,"https://docs.google.com/","",Replacer.ReplaceText,{"Column2"})
URLAuth = URLPre{1}[Column2],
AccessKeyParam = AccessKey,
SourceAccessKey = Xml.Tables(Web.Contents(URLAuth, [RelativePath = "https://docs.google.com/", Query=[accessKey=Text.From(AccessKeyParam)]]))
in
SourceAccessKey
In the service when you add to gateway, you can check "Skip connection test". This is checking if https://docs.google.com/ is a valid URRL. In this case it is, but for others reading this solution may not be.
Thanks for your answer SteveCampbell
So both URLs have now the Web.Content including the RelativePath.
Still both URLs individually work, but when I combine them (becasuse first one delivers input for the second one), the refresh in online environment fails.
As said, in Desktop it works fine.
So somehow in the refresh process, both queries bite each other.