# Understanding syntax for publishing outputs

**URL:** <https://community.seqera.io/t/understanding-syntax-for-publishing-outputs/2763>\
**Category:** Training\
**Tags:** nextflow\
**Created:** [September 14, 2026, 3:00pm UTC](https://community.seqera.io/t/understanding-syntax-for-publishing-outputs/2763 "2026-09-14T15:00:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![larisa-msoto](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/larisa-msoto/32/2585_2.png) [@larisa-msoto](https://community.seqera.io/u/larisa-msoto)\
**Post date:** [September 14, 2026, 3:00pm UTC](https://community.seqera.io/t/understanding-syntax-for-publishing-outputs/2763/1 "2026-09-14T15:00:14Z")

</div>

I’m a complete Nextflow beginner and I’m trying to understand the syntax rules for writing different components. I am trying to draw parallels to general programming languages to understand what’s a variable and what’s a process/function. For context, I have made it through section 2.2.2 _Run the workflow again_. Here’s my confusion: we declare the output under `publish` as `first_output = sayHello.out`. This makes `first_output` look like a variable. Then, inside the output block we write `first_output { path '.'}``, which makes `first_output` look like a process. What is `first_output` and what exactly are the two scenarios doing to it?

---

<div class="post-metadata">

**Author:** ![bentsherman](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/bentsherman/32/52_2.png) [@bentsherman](https://community.seqera.io/u/bentsherman)\
**Post date:** [September 14, 2026, 3:27pm UTC](https://community.seqera.io/t/understanding-syntax-for-publishing-outputs/2763/2 "2026-09-14T15:27:46Z")

</div>

This is admittedly an unusual part of the language. Pipeline outputs are declared in the `output` block but assigned in the workflow `publish:` section. So you can think of it like a variable

I think of the `output` block as one big JSON object containing all of the outputs, so each named output in my mind is like a property of that object

---

<div class="post-metadata">

**Author:** ![larisa-msoto](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/larisa-msoto/32/2585_2.png) [@larisa-msoto](https://community.seqera.io/u/larisa-msoto)\
**Post date:** [September 14, 2026, 3:48pm UTC](https://community.seqera.io/t/understanding-syntax-for-publishing-outputs/2763/3 "2026-09-14T15:48:04Z")

</div>

Thanks for the clarification. I guess I was expecting the properties of the object to look more like `first_output.path`. Is this the only type of block where something like this happens or does this style of assignation and declaration happen in other contexts?

---

<div class="post-metadata">

**Author:** ![bentsherman](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/bentsherman/32/52_2.png) [@bentsherman](https://community.seqera.io/u/bentsherman)\
**Post date:** [September 14, 2026, 4:35pm UTC](https://community.seqera.io/t/understanding-syntax-for-publishing-outputs/2763/4 "2026-09-14T16:35:38Z")

</div>

It’s the only one as far as I know. It was designed this way because the `output` block is essentially configuration, so it would have been ugly to cram the entire thing into the `publish:` section.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/system/32/2402_2.png) [@system](https://community.seqera.io/u/system)\
**Post date:** [September 21, 2026, 4:35pm UTC](https://community.seqera.io/t/understanding-syntax-for-publishing-outputs/2763/5 "2026-09-21T16:35:53Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
