# OPCUA Injection Node error

**URL:** <https://discourse.nodered.org/t/opcua-injection-node-error/40752>\
**Category:** General\
**Created:** [10 February 2021 14:52 UTC](https://discourse.nodered.org/t/opcua-injection-node-error/40752 "2021-02-10T14:52:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Angel](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@Angel](https://discourse.nodered.org/u/Angel)\
**Post date:** [10 February 2021 14:52 UTC](https://discourse.nodered.org/t/opcua-injection-node-error/40752/1 "2021-02-10T14:52:11Z")

</div>

Long ago I made a Nodered-OPCUA-61131 Program to send emails.

Now I would like to make a change in nodered but I have a problem with the write injection of a OPCUA Variable.

I check a value of an email in json format in a Switch Node(1) in order to send or not the email.  
This value tells me if the email should to be sended.

If it has not to be sended I should write an OPCUA variable to false.

I have tried to join the Switch Output with the OPCUA Injection Node (1-2) but I have an error (3) in the node (4).

When I try to inject the OPCUA variable manually there is not error and the varaible is written.

Do you have any clue?

Thank you

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/8/b829318473314486d9889398ded5ef4d4bb5ff0d.png)

---

<div class="post-metadata">

**Author:** ![Angel](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@Angel](https://discourse.nodered.org/u/Angel)\
**Post date:** [11 February 2021 09:10 UTC](https://discourse.nodered.org/t/opcua-injection-node-error/40752/2 "2021-02-11T09:10:30Z")

</div>

Hi,

I solved the problem with a function node, making the message inject type as write.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/1/213eeb6c384bdf033c1fb2d6547131cfa33aff9a.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/0/007eb66e98024d93de3b30d3a052a88bee3842e0.png)

Cheers

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 February 2021 09:10 UTC](https://discourse.nodered.org/t/opcua-injection-node-error/40752/3 "2021-02-25T09:10:45Z")

</div>

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