Power Automate sync/download to Dropbox file at URL link in email - email

I am trying to create a Power Automate flow that automatically syncs to Dropbox a file contained at a URL link in emails.
The email is always from the same email address, let's say: "example#example.com"
The URL link always has the same hyperlinked text: "Link to Signed Affidavit with Original Document Attached"
The URL link itself is dynamic and looks something like this (example): http://www.example.net/asp/showattachment.aspx?BlobID=aso23-gjin42-skgn34-23632
Each such email only contains one such link.
When the link is clicked, it goes to a PDF file in the webrowser. The link is not redirected to a different link.
I'd like this to trigger every time such an email is received. I'd like this to operate in the cloud without any desktop interaction.
Thanks!

I solved this myself.
In the "Compose" section, you need to parse out the URL from the email body using your own code. Below is what I used for my specific usage case. For my specific situation, I knew the URL would always be the same number of characters. If the URL length varies between emails, you'll need a more complex parse.
substring(outputs('Html_to_text')?['body'],add(58,indexof(outputs('Html_to_text')?['body'],'Link to Signed Affidavit')),95)

Related

Generate a dynamic URL within email HTML

I am having trouble finding a solution to this and would love to any thoughts or suggestions.
The overall aim is to dynamically generate a private link within an email, used to register/login users anonymously. Only those with a link will be able to access the app, and they will otherwise remain anonymous (i.e no link to their email address - identified only by the number included within the dynamic link). Obviously, if they share this URL, anyone can log in as them.
I would like to generate some sort of embed code that customers may copy/paste as part of an email template. Ideally, This code would dynamically create a unique identifier for each recipient on delivery. We will not be able to send a dedicated email to do this. For example, a customer clicks 'Generate embed link' within the admin panel. They will be provided with a html string that they may include within their email template, eg:
<html :href="www.myapp.com/customer1/register/batch1/{{dynamic_id}}"></html>
On receiving this email, the link may look like this:
<html :href="www.myapp.com/customer1/register/batch1/7877346"></html>
The idea is that the user could click the link and automatically register/log in using this URL. It is crucial that no one can see this URL other than the recipient, and there is no way of linking the sent email back to the dynamically generated ID. GDPR, bah :(
Hope this makes sense. Happy to hear alternative solutions or limitations here.
Thanks in advance.

How to send attachment with email in an ms access form

I was wondering would it be possible to create some sort of ms access form, where you would be able to upload any file and then be able to enter an email in another field, click a button, and send an email with said attachment to the entered email. So far I have the form created with an attachment field and below that I have a button and an empty field where the user can input an email that they would like to send the attachment to. My initial idea was to hard code the button to pull the attachment and send it to the desired email address using the .SendObject() function but i didn't find parameter for an attachment that I could send using the function.
:
In the highlighted box is where users can add any number of attachments and in the box to the right of the send button is a text box that would allow users to put in an email address that they would like to send it to.
If there is a better way of doing this with forms please let me know, I'm always up for learning new things.
You can interface with the outlook objectmodel to create a mailitem, then .send the message and .attach a file, but the file has to be accessible to the filesystem. If the file were embedded in access, you would have to export it out, then attach it. This link and this link should give you a good idea of how this process works.
If you don't have outlook available, then you will either need software that has a VBA compatible API, or you can use a webservice to post the mail, but both of those options are far to massive to talk about here, unless you can provide more specifics.
Edit since your edit:
If you can use Outlook, and you can just store the path to the file() in the attachments field as an array, then you an loop over the array with mailitem.attach to attach multiple files

URL encoding issue in email campaigns

BACKGROUND:
Sitefinity CMS for my specific problem, but could be general too.
I have an email message which has an unsubscribe link in it like this:
To Unsubscribe: Click or copy paste the following link in your browser.
https://www.domain.com/unsubscribe?mailingList={|MailingList.Title|}&SubscriptionEmail={|Subscriber.Email|}
{|MailingList.Title|} and {|Subscriber.Email|} are sitefinity CMS subscriber fields. When I send out an email these two fields resolve to their respective values. Hence, the URL I get in an email is as following for example.
https://www.domain.com/unsubscribe?mailingList=mymailingList&subscriptionEmail=abc#xyz.com
The user can click on it and unsubscribe from the mailing list.
My Problem:
If the mailing list name has a space in it, the link that appears on the email is broken at the first occurance of the space(link the link shown below breaks immediately =my) and hence clicking it is like clicking a invalid URL.
https://www.domain.com/unsubscribe?mailingList=my mailing List&subscriptionEmail=abc#xyz.com
I dont understand why the space in the URL doesnt resolve to a %20.
My Trial:
I changed the order of the querystrings to see if it works(mailinglist was the last string originally, I put it in the middle)
I am fine if the URL does not get resolved into a link at all, just forcing the users to copy paste the entire URL. But, I was not able to do it as well.
I have read in microsoft forums that OUTLOOK resolves the spacing issue, when the URL is surrounded by < and > like this :
URL here:
But the URL doesnt even show up in the email just like it is not showing up here above this line.
Tested on OUTLOOK, GMAIL, YAHOOMAIL, MICROSOFT MAIL. The link is broken in all email clients.
Any suggestions on what is the best solution for this?

Can you and how do you embed images in an email when using the Gmail API?

When creating a message and using it to create a draft or email using the Gmail API, can you have an image embedded in the body? I'm looking to have the image data actually embedded similar to how copying and pasting an image (the actual data, not the link) into a Gmail email will place the image right in the content.
Can it be done like this or do I need to upload the image to some other location and use HTML to embed the image in the email? Any pointers on how to do it?
The short answer is that you would do this the same way you would for any email service.
The long answer is that you need to create a multipart/related message, where one part is the HTML content of the email and the other part is the image. The image part contains a Content-ID header that specifies an ID for the image, and the HTML image tag references that ID in the src attribute using the format cid:ID_HERE.
An example of how to construct such an email in Python is here: https://stackoverflow.com/a/1633493
P.S. - A great way to see how emails are constructed is to look at the raw message. You can look at the raw message for a given email in Gmail by clicking the drop down arrow next to the message and selecting "Show original".

Email an image via custom url scheme

I am using custom url schemes. I can send string messages as parameters to my custom url and emailing this to any person. When any person opens this email attachment in device in it open my app installed in device with the passed parameters in my custom url.
Similarly how to email an image via custom url and when any person opens this attachment the image is passed to my app in device.
I tried to encode the image in base64 format and tried to append to my url,but not working.
Any ideas??
Thanks in advance
While there technically isn't a limit placed on url length by the standards, in practice, there is (see these two questions here on SO).
My guess is that you're running into that limit.