How to Call a Common Workflow Function in UiPath

I have created a common email function in a process (Main.xaml) file, and I want to call this function from my main project whenever an email needs to be sent.
How can I accomplish this?

Also, will this approach work if I need other common logic functions that I want to call from the main project? How can I pass parameters between the main project and the common function?

@sobin_paul

Add all values you need as arguments and then use invoke worklfow activity where ever you need it

cheers

@sobin_paul

You will have to use Invoke Workflow File activity for this. Follow this amazing tutorial from Jepp.

Hi @sobin_paul

You will have to use Invoke Workflow File activity for this. Also recommend you to Learn to use arguments between workflows as this is much important when you are invoking workflows. Follow this tutorial.

Hi @sobin_paul

Create the email logic in a separate xaml file and call it with Invoke Workflow File. Define arguments in the common workflow and pass values from the main project. This same approach works for other reusable functions and lets you send parameters in and out.

Check:

If helpful, mark as solution. Happy automation with UiPath