Get value from other property

{
	displayName: 'Phone Number',
	name: 'phoneNumber',
	type: 'string',
	default: '123456789'
},
{
	displayName: 'Operation',
	name: 'operation',
	type: 'options',
	noDataExpression: true,
	displayOptions: {
		show: {
			resource: [
				'updatePresence',
			],
		},
	},
	options: [
		{
			name: 'Typing',
			value: 'typing',
			description: 'A test',
			routing: {
				request: {
					method: 'POST',
					url: '/update-presence',
					headers: {
						"Content-Type": "application/json"
					},
					body: {
						phoneNumber: '={{ $json["properties"]["phoneNumber"]}}',
						type: "composing"
					},
				},
			},
		},
	],
	default: 'typing',
},

How could I get the value from phoneNumber property and attach into request body?
It’s a declarative-style node

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Try {{$parameter["phoneNumber"]}}, example in declarative style code of line 42.

2 Likes

Cool! It works without problems.

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