Power Automate Get Planner Task Assignee Names - power-automate

I'm working on a Power Automate flow where the flow is supposed to connect to Planner, get the tasks which are due tomorrow and send a message to an MS Teams Channel.
I got the entire flow working except of one thing - getting the names of the person(s) whom the task is assigned.
Here's my current flow:
Getting the list of Tasks from Planner,
Filter those which have a Due Date set,
Filter the ones which have the Due Date tomorrow,
Get the Name of the Task Creator using Get User Profile,
Send the data into an MS Teams Channel.
This all works perfectly fine. However I also need to get the names of the Assigned users. I understand that they come as an array. And when I try to add it to the same Get User Profile it's getting wrapped into an unnecessary "Apply to Each" which breaks everything.
Does anyone have a clue how this can be solved? Basically I need only 1 Assignee as we are not going to assign the same task to more than 1 person.
Any help would be much appreciated!

In order to avoid the loop (which is also a valid approach, long story) then you can use an expression to get the first (in case there are multiple) assigned user.
This is an example where you don't need to loop ...
... you can see I've initialised a (string) variable at the top which will hold the user ID GUID.
... then further down in the Set Assigned To operation, this is the expression I use ...
item()?['_assignments'][0]['userid']
That gets the first user and then the associated userid property. You can then pass that into the Get user profile (V2) task ...
Obviously, you need to adapt that to your flow but I hope that makes sense.

Related

Webi: On opening, filter data by current user name which can be in or not in a given list (no prompt)

(SAP BusinessObjects BI Platform 4.3 Support Pack 1 Patch 11 Version : 14.3.1.4142.11)
Disclosure: I'm not born english speaking, but if I have understood correctly, we should now use "they", instead of he/she, etc. That is what I did here. Just to be sure no one is confused while reading.
Hi everyone, it's me again for a webi question.
I have this report in which I have data for a group of workers. These data are: their name, when they work, where, which activity they do, etc.
Worker name
Other information
Worker A
...
Worker B
...
...
...
Worker M
...
Worker Z for example is not in the list.
I currently have a filter "name" (multi-list), which allows us to select one or more workers (Worker A, Worker B,...). By default, it shows all data.
There is an auto-refresh on opening.
The function CurrentUser() returns the worker ID, not the name.
Worker name
Worker ID
Worker A
238x01f93
Worker B
4j192h60a
...
...
Worker Z
09ad812jn
I have two kind of user, that can see this report:
A user whose name is present in the list of workers (e.g. Worker A).
A user whose name is not present in the list of workers (e.g. Worker Z).
My goal:
When the user opens the report, the filter "name" is set by default with their name (e.g. Worker A). This way, they see only their data. If they want to see the data of other workers, they can easily change the filter to select other workers (e.g. Worker B and C). It should not be limited.
When the user (Worker Z) opens the report, they see all data. They can naturally use the filter to select only one or a few workers if they want to.
What I did/tried:
I can change things in the view (database), in the universe or/and in the report. I only tried things on the report level, because I could not see any ways to help me solve this on universe or view level. (But I am open to suggestions! :-) )
Create a variable to:
Filter for only current user ID. It worked, but only if the user name was in the list. Another problem is that the workers don't know this user ID and can't work with it.
=CurrentUser()
Search in the list, if the current user ID exists. Does not work. It shows always all data.
If (Pos([Personalnumber];CurrentUser()) > 0) Then CurrentUser() Else [Personalnumber]
Link the current worker ID with their name if they are in the list. It worked well for them, but I could not find a way to have all workers, if the current user name is not in the list.
If (CurrentUser() = [Personalnumber]) Then [Name] Else "All"
I read so many posts, but none for my case. It is often to prevent user to see all the data, which is not what I want. They should be able to see everything, if they want to.
We only want to filter for the current user for performance means and also efficiency. The user does not have to select themselves the right filter and loose time. Most of the time, they only wants to see their data.
Can anyone help me?
Don't hesitate to tell me if something is unclear or missing. :-)
Thanks for your time!

Flow Triggering Itself(Possibly), Each run hits past IDs that were edited

I am pretty new to power automate. I created a flow that triggers when an item is created or modified. It initializes some variables and then does some switch cases to assign values to each of them. The variables then go into an array and another variable is incremented to get the total of the array. I then have a conditional to assign a value to a column in the list. I tested the flow specifically going into the modern view of the list and clicking the save button. This worked a bunch of times and I sent it for user testing. One of the users edited multiple items by double clicking into the item which saves after each column change(which I assume triggers a run of the flow)
The flow seemingly works but seemed to get bogged down at a point based on run history. I let it sit overnight and then tested again and now it shows runs from multiple IDs at a time even though I only edited one specific one.
I had another developer take a look at my flow and he could not spot anything wrong with it and it never had a hard error in testing only warnings about conditionals causing a loop but all my conditionals rectify. Pictures included. I am just not sure of any caveats I might be missing.
I am currently letting the flow sit to see if it finishes getting caught up. I read about the concurrent run option as well as conditions on the trigger itself. I am curious as to why it seems to run on two records(or more) all at once without me or anyone editing each one.
You might be able to ignore the updates from the service account/account which is used in the connection of the actions by using the following trigger condition expression:
#not(equals(triggerOutputs()?['body/Editor/Claims'], 'i:0#.f|membership|johndoe#contoso.onmicrosoft.com'))

GA3 Event Push Neccesary fields in Request

I am trying to push a event towards GA3, mimicking an event done by a browser towards GA. From this Event I want to fill Custom Dimensions(visibile in the user explorer and relate them to a GA ID which has visited the website earlier). Could this be done without influencing website data too much? I want to enrich someone's data from an external source.
So far I cant seem to find the minimum fields which has to be in the event call for this to work. Ive got these so far:
v=1&
_v=j96d&
a=1620641575&
t=event&
_s=1&
sd=24-bit&
sr=2560x1440&
vp=510x1287&
je=0&_u=QACAAEAB~&
jid=&
gjid=&
_u=QACAAEAB~&
cid=GAID&
tid=UA-x&
_gid=GAID&
gtm=gtm&
z=355736517&
uip=1.2.3.4&
ea=x&
el=x&
ec=x&
ni=1&
cd1=GAID&
cd2=Companyx&
dl=https%3A%2F%2Fexample.nl%2F&
ul=nl-nl&
de=UTF-8&
dt=example&
cd3=CEO
So far the Custom dimension fields dont get overwritten with new values. Who knows which is missing or can share a list of neccesary fields and example values?
Ok, a few things:
CD value will be overwritten only if in GA this CD's scope is set to the user-level. Make sure it is.
You need to know the client id of the user. You can confirm that you're having the right CID by using the user explorer in GA interface unless you track it in a CD. It allows filtering by client id.
You want to make this hit non-interactional, otherwise you're inflating the session number since G will generate sessions for normal hits. non-interactional hit would have ni=1 among the params.
Wait. Scope calculations don't happen immediately in real-time. They happen later on. Give it two days and then check the results and re-conduct your experiment.
Use a throwaway/test/lower GA property to experiment. You don't want to affect the production data while not knowing exactly what you do.
There. A good use case for such an activity would be something like updating a life time value of existing users and wanting to enrich the data with it without waiting for all of them to come in. That's useful for targeting, attribution and more.
Thank you.
This is the case. all CD's are user Scoped.
This is the case, we are collecting them.
ni=1 is within the parameters of each event call.
There are so many parameters, which parameters are neccesary?
we are using a test property for this.
We also got he Bot filtering checked out:
Bot filtering
It's hard to test when the User Explorer has a delay of 2 days and we are still not sure which parameters to use and which not. Who could help on the parameter part? My only goal is to update de CD's on the person. Who knows which parameters need to be part of the event call?

Mailchimp members activity

I've got some kind of script. Goal is:
Get Mailchimp Lists
For each list get members
For each member get activity
Store it
Does anyone know - if there any way to not use one API call for each member to get his activity?
I've got around 28 000 members.
28 000 API calls - seems as bad as it can be.
I've tried to get Lists Activity, but no way, it is always empty. So I really have to get exactly members activity.
I'm currently attempting to do something very similar and there is a workaround, although I am not sure how feasible it is. Basically, you can do it through reports, email activity:
http://developer.mailchimp.com/documentation/mailchimp/reference/reports/email-activity/
The challenge here will be that you will try to pull 28.000+ records at a time, therefore it will take a long time. From my brief calculations it can take up to 1 minute per 1000 records (you will need to loop through 1000 records at a time, otherwise it will most likely time out).
The larger problem is maintaining this 'database', if you have activity constantly happening (i.e. opens/clicks/bounces) then you will need to pull the whole campaign activity again and update wherever you store it. I've been trying to find a workaround with no success. You could use the 'since=2017-10-07T00:00:00+00:00' parameter, however it still returns a blank list when there is no activity unfortunately. If only 1000 members are actually active, it will return 27.000 rows of no activity. It would be great if there would be another parameter we could potentially apply to return only emails where there was an action.
Please let me know if you find a better solution.
P.S. - it might be worth reaching out to mailchimp support for this
Update - you can use the Mailchimp Export api: https://developer.mailchimp.com/documentation/mailchimp/guides/how-to-use-the-export-api/ and extract the email activity. I had huge issues unpacking it, please follow the links below: Decode text response from API in Python 3.6 and Separate pd DataFrame Rows that are dictionaries into columns . Let me know if you have any other questions.

Pipedrive is it possible to send a new user notes deal etc to a specific pipeline?

My pipedrive deals are sorted in different pipeline that I can find easily with this kind of request :
api.pipedrive.com/v1/pipelines/ID_PIPELINE?api_token=######
So what I was doing until now is to send data to
api.pipedrive.com/v1/organizations
api.pipedrive.com/v1/persons
api.pipedrive.com/v1/deals
api.pipedrive.com/v1/notes
And I send it to the user info#, which is link to a form type "contact-us"
What happen is that it goes by default to the primary pipeline, associated to info#
We created a second pipeline, also associated to info# and when I am sending organizations / persons etc, I am asked if it's possible to send it directly into the new pipeline instead of the "default one".
Like api.pipedrive.com/v1/pipelines/ID_PIPELINE/organizations?api_token=######
etc
At the moment I haven't find a clue about it, I wanted confirmation.
I get it now. You can't add a deal straight to a Pipeline. But you can do so in Stage.
So what I did was get the specific Pipeline and then get the first Stage in its list and then use that Stage ID to add the Deal in.
PS. I'm going to improve this answer later. But basically that's the gist of how to achieve what you want to do.

Resources