How can I retrieve the front matter in my script?

Most Drafts action steps use templates to generate values used in the action. Typically, the way that would be configured in Drafts is to have values separated by line, and use a [[line|n]] tag to get that value in the template.

For a Gmail action, that might mean you have [[line|1]] as the subject, [[line|2]] as the “TO” field, and [[line|3..]] as the body template value - meaning the first line would be the subject, the second line the email of the “TO”, etc.

More on templates in this article.

2 Likes