We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Help with Python tool

TormentMaker
8 - Asteroid

So guys, i have the following code:

 

import win32com.client as win32

outlook = win32.Dispatch('outlook.application')

email = outlook.CreateItem(0)

Image = "########"
email.To = "#######"
email.Subject = "Test of auto email"

email.HTMLBody = f"""<p>Hello world<p>"""

email.Attachments.Add(Image)
email.Send()
print("Email sent")

 And would like to know how i insert it in alteryx? some peeps said i could work with python inside alteryx but this tool is kind of confusing to me

2 REPLIES 2
apathetichell
20 - Arcturus

There's a lot of e-mail capability inside of Alteryx so I do not believe this is the best use of the Python tool. You can write python code to send an e-mail, but I don't see why you'd want to do that.

Drussek
9 - Comet

Just inserted your code to Python tool and returned sth on 1 output.

Good example to start using Python in Alteryx.

Labels
Top Solution Authors