I have a sharepoint designer workflow that adds a task to a list when a document is added to a library, and makes the document a Related Item on the new list item. I have un-hidden the Related Items field from the Task content type. I add the field to both the library and the list, and when the document is added as a related item to the list item, SharePoint makes it a two way link.
I would like to try and use Flow to replicate this workflow. I need the Item ID, the GUID for the Web, and the GUID for the list. The format for a related item is:
{"ItemId":<id>,"WebId":"<guid here>","ListId":"<guid here>"}
...and the list of related items is contained in square brackets: [{related item 1},...,{related item N}]
So the question is, can I get the Web and List GUIDs in Flow, or do I have to create some function to find them and call that from the flow. There will be multiple sites containing this list so I would like to make the Flow as generic as possible.