title: Configuring Pub/Sub destination for ad-hoc Transcoder API job requests in Google Cloud
body: <p>Using the Node JS client, I can't get the Transcoder API to accept the pub/sub destination.</p>
  <p>The documentation variously says to configure the <a href="https://cloud.google.com/transcoder/docs/how-to/create-pub-sub" rel="nofollow noreferrer"><code>pubsub_destination</code></a> field or the <a href="https://cloud.google.com/transcoder/docs/reference/rest/v1/JobConfig" rel="nofollow noreferrer"><code>pubsubDestination</code></a> field, but neither appear to work when creating a job using the <code>createJob</code> method (following and extending the <a href="https://cloud.google.com/transcoder/docs/samples/transcoder-create-job-from-ad-hoc" rel="nofollow noreferrer">example</a> for ad-hoc job creation).</p>
  <pre class="lang-js prettyprint-override"><code>const config = {
        parent: client.locationPath(projectId, location),
        job: {
          inputUri: inputUri,
          outputUri: outputUri,
          config: {
            elementaryStreams: [
              {
                key: 'video-stream0',
                videoStream: {
                  h264: {
                    heightPixels: 360,
                    widthPixels: 640,
                    bitrateBps: 550000,
                    frameRate: 60
                  }
                }
              },
              {
                key: 'audio-stream0',
                audioStream: {
                  codec: 'aac',
                  bitrateBps: 64000
                }
              }
            ],
            muxStreams: [
              {
                elementaryStreams: ['video-stream0', 'audio-stream0'],
                key: 'sd',
                filename: 'sd.mp4',
                container: 'mp4'
              }
            ]
          },
          pubsubDestination: { topic: `projects/${projectId}/topics/transcoder` }
        }
      };
  return await client.createJob(request);
  </code></pre>
  <p>The job gets created and completes successfully, but the config field of the created job shows <code>&quot;pubsubDestination&quot;: null</code>.</p>
  <p>What am I doing wrong?</p>