Skip to content

Use variables from previous task in SendGrid Body  #16

@gioce90

Description

@gioce90

I have an Azure Pipeline where I have

  1. a "Powershell Script" task that save data in variables
  2. a "SendGrid Email" task that must include these variables in the body

In the powershell script, I use the convention
Write-Host "##vso[task.setvariable variable=var1]<div>$var1</div>"
From other scripts I can retrieve the variable usign a simple $var1 ... but in SendGrid Email task this doesn't work

How can I include the results of previous tasks in the body of the email?
I noticed that other standard variables as $(Release.Deployment.RequestedForEmail) works well. Why for user-defined variables is not the same?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions