Resource Custom Auth (defined variable) within a function in a workflow

Mmh.. seems like a possible answer: Support resources with Custom Authentication in Workflows