Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Reply
kewaynes333
Helper I
Helper I

Use Notebook Variable in Email Activity

I have a varibale in a notebook called 'messages'. I have an Outlook activity connected to the Notebook activity. How can I reference this varibable in the Outlook activity to use it in the body of the email?

4 REPLIES 4
jwinchell40
Super User
Super User

@kewaynes333  - I'm not sure what kind of object "messages" is but you can pass data back from the Notebook via the Exit Variable.

  • mssparkutils.notebook.exit(<value>)

It can be a simple string or a json/array value among other things. You should then be able to reference it in the set variable by doing:

 

  • @activity(<activity_name>).output.result.exitValue

If you send back a JSON object you can convert the string in the pipeline use @Json() and then reference values within the JSON object.

 

  • @Json(activity(<activity_name>).output.result.existValue).<property>
Anonymous
Not applicable

Hi @kewaynes333 ,

Thanks for using Fabric Community.

As @jwinchell40 said, please follow the below steps to get data from Notebook to Pipeline.

vgchennamsft_0-1717397096042.png

 

vgchennamsft_1-1717397104773.png



vgchennamsft_2-1717397113612.png


Hope this is helpful. Please do let me know incase of further queries.

Anonymous
Not applicable

Hi @kewaynes333 ,

We haven’t heard from you on the last response and was just checking back to see if your query was answered.
Otherwise, will respond back with the more details and we will try to help .

Thanks

Anonymous
Not applicable

Hi @kewaynes333 ,

We haven’t heard from you on the last response and was just checking back to see if your query was answered.
Otherwise, will respond back with the more details and we will try to help .

Thanks

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.