locked
Web Activity - Adding dataset content to the Body RRS feed

  • Question

  • Hi

    I have a dataset that produces a small table of results (7 columns, 5 rows) that I'd like to place in the body of the Web Activity POST so that it can be passed through to a Logic App. I've selected the dataset and the linked service in the Web Activity but if I try and deploy it tells me I need a Body for all POST requests. There doesn't appear to be anything in the GUI that allows me to put the results of my dataset into the Body and my attempts at following the somewhat patchy Microsoft documentation and write some JSON have all failed. Has anyone had any success doing this?

    Thanks

    Matt

    Wednesday, June 26, 2019 8:51 AM

Answers

  • Hi Matt,

    Great question!

    You can do the following to achieve your intent :

    • use a Lookup activity to get the contents of your table.
    • chain your web activity to this lookup activity so that it is executed only once the Lookup activity has succeeded and you can use the output of the Lookup Activity as shown below :
    • Form the body for the POST call using the output of this Lookup Activity in your desired format.

    Quick Tip - You can also chain a "set variable" activity to store the result of the Lookup activity and reference this variable in the body of the POST call in your web activity.

    Hope this helps.


    Wednesday, June 26, 2019 9:09 AM

All replies

  • Hi Matt,

    Great question!

    You can do the following to achieve your intent :

    • use a Lookup activity to get the contents of your table.
    • chain your web activity to this lookup activity so that it is executed only once the Lookup activity has succeeded and you can use the output of the Lookup Activity as shown below :
    • Form the body for the POST call using the output of this Lookup Activity in your desired format.

    Quick Tip - You can also chain a "set variable" activity to store the result of the Lookup activity and reference this variable in the body of the POST call in your web activity.

    Hope this helps.


    Wednesday, June 26, 2019 9:09 AM
  • Fantastic, that works perfectly, thank you.

    Is this the correct way of loading tables into the body of a Web Activity or just a workaround? Also, I understand that the lookup activity is limited to 5,000 rows, any ideas how I might go about using a SQL query that generates a table containing 30,000 rows?

    Wednesday, June 26, 2019 3:31 PM
  • Hi Matt,

    Sorry for the delayed response. You can use a custom activity to get the job done. 

    Monday, July 1, 2019 5:54 AM