web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Adaptive card triggers...
Power Automate
Unanswered

Adaptive card triggers multiple times

(0) ShareShare
ReportReport
Posted on by 27

Hi,

 

I have created a flow where it will take the Email Id from O365 groups and post an adaptive card to the user on teams, asking about user details. The flow is working perfectly fine however, I get the first adaptive card three times one after another.

 

Ideally, it should be triggered only once per user when the flow starts. How do I control that? Is this a bug or do I need to change any control or logic? 

Kindly advise and help.

 

Thanks & Regards,

Ashish

 

 

Categories:
I have the same question (0)
  • MarcelLehmann Profile Picture
    378 on at

    Do you have a screenshot of the flow? 

  • Ashish2605 Profile Picture
    27 on at

    Sure, below are the screenshots - 

    I am taking output of C2 in Apply to each loop A2E2 given below, one by one by incrementing the variable 'namecounter' (initially set to 0). So each time, it will take the traverse through the array and take the item in incremental order.

    Ashish2605_0-1681100522206.png

    Next step, it will trigger an adaptive card, and based on the condition, if the response is yes, it will trigger that adaptive card and if no, the same. 

    Inside adaptive card, I am using - Outputs('C2')?[variables('namecounter')]?['Name'] , so as to take the first name, trigger AC, increment namecounter variable, trigger to next user and so on.

    Ashish2605_1-1681101176313.png

     

    In the above A2E2 loop, it should trigger the AC only once per user in the start. 

     

    where do I change the logic? Thanks,

  • Ashish2605 Profile Picture
    27 on at

    @MarcelLehmann can you help on the above?

  • MarcelLehmann Profile Picture
    378 on at

    If I understood correctly, you want to read a group, get an output like with C2, and simply go through and process each individual.

     

    I don't quite understand the use of the variable "namecount" yet.

     

    If this is the case, as I just described, try using this code, insert it into your flow (copy & paste -> https://lehmann.ws/2022/12/21/powerplatformtip-12-components-for-powerautomate/) and build it the same way in your setup.

     

    {"id":"f804366a-682d-4fd3-9006-4ba8100e251b","brandColor":"#8C3900","connectionReferences":{},"connectorDisplayName":"Control","icon":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDMyIDMyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KIDxwYXRoIGQ9Im0wIDBoMzJ2MzJoLTMyeiIgZmlsbD0iIzhDMzkwMCIvPg0KIDxwYXRoIGQ9Im04IDEwaDE2djEyaC0xNnptMTUgMTF2LTEwaC0xNHYxMHptLTItOHY2aC0xMHYtNnptLTEgNXYtNGgtOHY0eiIgZmlsbD0iI2ZmZiIvPg0KPC9zdmc+DQo=","isTrigger":false,"operationName":"Scope","operationDefinition":{"type":"Scope","actions":{"C2":{"type":"Compose","inputs":[{"Email":"XY","Name":"XY"},{"Email":"XY","Name":"XY"}],"runAfter":{}},"Apply_to_each":{"type":"Foreach","foreach":"@outputs('C2')","actions":{"AC":{"type":"Compose","inputs":{"data":{"acDecision":"Yes"}},"runAfter":{}},"Condition":{"type":"If","expression":{"equals":["@outputs('AC')?['data']?['acDecision']","Yes"]},"actions":{"Compose":{"type":"Compose","inputs":"@outputs('AC')?['data']?['acDecision']","runAfter":{}}},"runAfter":{"AC":["Succeeded"]}}},"runAfter":{"C2":["Succeeded"]}}},"runAfter":{}}}
  • MarcelLehmann Profile Picture
    378 on at

    in the image you could see my solution - that what i understand.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard