Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I am trying to create a step-by-step operation btw Power BI and Oracle Eloqua.
The operation requires 3 steps:
1- POST request to Eloqua (creates a URL for export)
2- POST request to Eloqua (creates a sync URL based on the export URL in the first step)
3- GET request to Eloqua (calls the data from the URL in the second step.
The first step, I already completed. Below is the code:
let Query1 = let strBody = "[{""Text"":""" & Text.Replace(varInputText,"""","'") & """}]", body = "{ ""filter"": ""'{{Activity.Type}}'='EmailOpen'"", ""name"": ""Bulk Activity Export - Email Open"", ""fields"": { ""ActivityId"": ""{{Activity.Id}}"", ""ActivityType"": ""{{Activity.Type}}"", ""ActivityDate"": ""{{Activity.CreatedAt}}"", ""ContactId"": ""{{Activity.Contact.Id}}"", ""IpAddress"": ""{{Activity.Field(IpAddress)}}"", ""VisitorId"": ""{{Activity.Visitor.Id}}"", ""VisitorExternalId"": ""{{Activity.Visitor.ExternalId}}"", ""EmailRecipientId"": ""{{Activity.Field(EmailRecipientId)}}"", ""AssetType"": ""{{Activity.Asset.Type}}"", ""AssetName"": ""{{Activity.Asset.Name}}"", ""AssetId"": ""{{Activity.Asset.Id}}"", ""SubjectLine"": ""{{Activity.Field(SubjectLine)}}"", ""EmailWebLink"": ""{{Activity.Field(EmailWebLink)}}"", ""CampaignId"": ""{{Activity.Campaign.Id}}"", ""ExternalId"": ""{{Activity.ExternalId}}"", ""DeploymentId"": ""{{Activity.Field(EmailDeploymentId)}}"", ""EmailSendType"": ""{{Activity.Field(EmailSendType)}}"", ""EmailAddress"": ""{{Activity.Field(EmailAddress)}}"", ""ContactIdExt"": ""{{Activity.Contact.Field(ContactIDExt)}}"" } }", Source = Json.Document(Web.Contents("WebURL", [Headers=[Authorization="Basic", #"Content-type"="application/json"], Content=Text.ToBinary(body)])), #"Converted to Table" = Record.ToTable(Source) in Source, #"Converted to Table" = Record.ToTable(Query1) in #"Converted to Table"
This works just fine and creates the export URL which is someting like "/activities/exports/1111", but I am stuck in the 2nd step.
Here is the code I am trying to use in the second step:
let strBody = "[{""Text"":""" & Text.Replace(varInputText,"""","'") & """}]", body = "{ ""syncedInstanceUri"": ""& I should include here the URL (dynamic) from the first step &"" }", Sourcetwo = Web.Contents("Web URL", [Headers=[#"Authorization"="Basic", #"Content-type"="application/json"], Content=Text.ToBinary(body)]) in Sourcetwo
When I use the hard URL from the first step, the second step also works fine, but I couldn't figure out how to make a dynamic call in the 2nd step.
Can you please support me on this? Executing both steps in a single query would be perfect, but if not seperate queries are also fine as long as they are dynamic.
Best regards,
Ugur Gulluev
hi, @ugurgulluev
You may refer to this post:
https://community.powerbi.com/t5/Desktop/Dynamic-Nested-API-Calls/td-p/250267
Best Regards,
Lin
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |