How to click a button in email to save a file Power Automate - power-automate

I receive monthly around 200 e-mail like the image in attach, and would like to use power automate to:
Receive an e-mail from a specific sender;
The subject contains specific words "ex: invoice";
Click in a button (link);
Save the file from that link inside a sharepoint file:
If possible I would like to save file name as a part of the e-mail subject for example the bold part (XXX Invoice - R1234/12AA2226-10-22 - )
I tried some flows without success.
Appreciate if someone can help me :)
I tried some flows in the internet but without success

You won't need to click a button. You can trigger a power flow with 'When an email is received' then add a condition - has attachment and subject or body contains = 'invoice'. Use then add step Get Attachments.
Here's a similar flow - but add a condition after step 2 to filter only these types of emails.

Related

Slack Modal views: expand the stack to more than 3 before final submission

I'm working on a slack bot that have more than 3 modals until I submit it to process.. According to slack docs, the view stack is limit to 3 so I though that I cloud just close the oldest one and free a slot for a new one.. not sure if that make sense (Im actually trying to limit the whole experience to those 3 modals)... in this case goes like this:
Slash command --> views.open (open modal step1 to user and send a null response).
The user submit step1 modal and I trigger a push response operation with the next modal (step2).
idem ... showing modal step3 with a review of the values (I store them using Object Store -Mulesoft)..
this submit with do some process on the data from the step1 and step2 modals and response with a IM to the user with the result
On the 2nd step I tried to trigger a POST to views.push but the trigger ID from the submission is not valid, have to be the trigger id from a block action according to slack.
On step 1 and 2 modals I replace the word SUBMIT with NEXT and only on the final one it say SUBMIT.
One thing... I know that by not closing the views I can close and sort of "go back".. which I will loose if I expand the stack..
I tried to trigger another POST on views.open with a null response for while the response from that POST is good (ok: true)... on the UI... I get the error "We had some trouble connecting. Try again?" on the "step1" modal..
Anyone have any ideas on how can I close modal from the bottom of the view stack so I can add a new one and so on? I know the use case may not be the best (slack apps should make thins easier not form after form..) but just want to know if it can be done).
Thanks!
Well... I have come a long way since I posted this... I ended up using JS but one thing that I want to share if you are on the same situation is that as long you responde the SUBMIT with an sync acknowledgment (is easier in js) the modal will close and then you can send/open another one and so on...

How to get 2nd div of the same class with Cypress

I have a chatbot application which I want to test it with Cypress. I'm looking at the case if the bot has responded to client correctly. So I check after click I should get a div which has class bot-message.
cy.get('.bot-message').should('have.text','I want to send invoice to my email')
CypressError: Timed out retrying: expected
[ <div.bot-message>, 3 more... ] to have text
I want to send invoice to my email. , but the text was
I want to see my profile.I want to see my invoices.
I want to send invoice to my email
The problem here is that cypress gets all the divs within a class named bot-message.
So what I want to be able to do is to say get the 3rd div of the same class. If that is not the case then I think I should give data attributes to every bot message div
Use the eq to get A DOM element at a specific index in an array of elements.
From API docs:
The querying behavior of this command matches exactly how .eq() works in jQuery. Its behavior is also similar to that of the CSS pseudo-class :nth-child() selector.
cy.get('.bot-message')
.eq(1) // to get 2nd element. array index (counting) starts from 0
.should('have.text','I want to send invoice to my email');
What about contains ?
cy.get('.bot-message').contains('I want to send invoice to my email')

Microsoft PowerApps | How to get calendar events from o365 connection?

I'm currently testing some stuff with Microsoft PowerApps. My aim is to create an app, which shows the calendar events of my office 365 account. I've applied the connection to office 365, and was able to get emails. But I don't know how to get the events, because nothing is documented. In the PowerAppStudio environment I can see that functions such as Office365.CalendarGetItem(... are available but the syntax is unclear. Please, can someone explain to me how to use it correctly.
My experience as follows;
You need to use
Office365Outlook.CalendarGetTables()
to get the Calendar object.Names and
Office365Outlook.CalendarGetItems()
To get the Calendar items for that object.
To demonstrate:
Add your Office365 outlook connector
Create a dropdown and take note of the name, or give it a new name
Set the Items value of the dropdown to Office365.CalendarGetTables().value
This gives you a your reference to get calendar items from - which you can now do with a gallery;
Add a gallery (I just pick a layout template I like and reconfigure)
Set the Items value of the gallery to Office365.CalendarGetItems(YourDropDownName.Selected.Name).value
where YourDropDownName is the name of the dropdown you created.
It will, by default, list from today's meetings onwards.
There are some filter options with CalendarGetItems, the syntax is as follows;
Office365Outlook.CalendarGetItems (string table, [advanced][Optional]string $filter, [advanced][Optional]string $orderby, [advanced][Optional]integer $skip, [advanced][Optional]integer $top)
I use this great reference as well PowerApps reference
You need to select a calendar where the items will be read.
Office365.CalendarGetItems(name of your calendar).value
Add the Office 365 connector as a connection
Create blank form
Add a listbox
Set ListBox>Items = Office365.CalendarGetTables().value.DisplayName
Add a gallery
Change gallery style to be Title and subtitle on Data tab
Dry gallery>Items = Office365.CalendarGetTables().value
You can now see your calendars and their names.
I'm going to futz around further with this...
In the "My experience" answer, I had to change "Office365." to "Office365Outlook.". I suspect content errors as the example of advanced options used "Office365Outlook.CalendarGetItems".
So
Office365.CalendarGetTables().value
Office365.CalendarGetItems(YourDropDownName.Selected.Name).value
became
Office365Outlook.CalendarGetTables().value
Office365Outlook.CalendarGetItems(YourDropDownName.Selected.Name).value
My Power Apps data source was "Office365Outlook" and my own email account at https://outlook.office.com/mail/inbox .
These worked for me.

System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client

I have a telerik radscheduler. I make appointments on it. To add an appointment I have date boxes and a radeditor. On the radeditor I have entered text like this "my test link". I made the word link as a hyperlink (pointing to some link on the internet). I have a submit buttton that adds the appointment. WOrks fine. I click to edit the appointment.Edit it and now save it and it gives me this exception "System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client ". I put validaterequest="false" and it works,but I am reading it is not safe/correct way. How do i proceed?If you need info,please ask.Thanks
It seems like you pass HTML to a field you later edit with a simple textbox, so such an error is expected. Perhaps where you use a RadEditor to get HTML, you should not.

Require PayPal DropDown Answer

Is there a way to REQUIRE a PayPal dropdown to be answered? Currently, my choices are 1. Select One, 2. Satchel Brown, and 3. Midnight Black. If I skip it, it accepts "Select One" as the option. What to do? Leave the first option blank? I don't want to use a default answer.
Are you using a custom button (code generated using a form) or a paypal supported button that you generated the code for in paypal?
If you are using a paypal custom created button, create a confirmation page and have it post the users choice to there. Then, using php, check to see that the users choice is one of the valid options. If it is not, then simply use the header('Location: http://www.MyWebsiteHere.com/Wherever.php?&error=Unselected') to send them back to the page and add a error message so if(isset($_GET['error'])), then echo $correspondingErrorMessage. Very simple thing if you do it like this.

Resources