Bitcoin raw transaction with manually created redeem script I am running bitcoin in regtest mode with 2 nodes bitcoinNode1 and bitcoinNode2.I have created a redeem script by writing the opcodes and converted into hex form using btcc.

HP-ProBook-440-G4:~$ btcc OP_IF OP_SHA256 a967bf5e8ca09e059d6bb7a3efa8f62190284649d3eab773518827164ac481fb OP_EQUALVERIFY OP_DUP OP_HASH160 f5fb6147ff889a392211d0f0831a71137bedbff1 OP_ELSE OP_200 OP_CSV OP_DROP OP_DUP OP_HASH160 cac5d03956494ffc17f78ea7b71189abf7f3593d OP_ENDIF OP_EQUALVERIFY OP_CHECKSIG

O/p: 63a820a967bf5e8ca09e059d6bb7a3efa8f62190284649d3eab773518827164ac481fb8876a914f5fb6147ff889a392211d0f0831a71137bedbff167064f505f323030064f505f4353567576a914cac5d03956494ffc17f78ea7b71189abf7f3593d6888ac


Now i am trying to create a raw transaction using the redeem script.

HP-ProBook-440-G4:~$ bitcoin-cli -regtest -datadir=./bitcoinNode1 -conf=./bitcoinNode1/bitcoin.conf -rpcuser=user1 -rpcport=19001 createrawtransaction "[{\"txid\":\"818978d31bf63158612d080c4a934a78a52f52f7bc797cc1f84f6ca8cc4b2dea\",\"vout\":0}]" "[{\"63a820a967bf5e8ca09e059d6bb7a3efa8f62190284649d3eab773518827164ac481fb8876a914f5fb6147ff889a392211d0f0831a71137bedbff167064f505f323030064f505f4353567576a914cac5d03956494ffc17f78ea7b71189abf7f3593d6888ac\":0.01}]"


But i am not able to create as it says invalid bitcoin address.

Should i convert the redeem script into p2sh? If yes can you please suggest how to create p2sh and do raw transaction with that p2sh?
You can't just give Bitcoin Core the redeemScript, it won't know what to do with it. The only valid thing to give it is an address, but you have not given it an address. You need to convert your redeemScript into a P2SH address first, then you give it that address.

You can use the decodescript command to get both the p2sh and p2wsh addresses for your redeemScript:

$ bitcoin-cli decodescript 63a820a967bf5e8ca09e059d6bb7a3efa8f62190284649d3eab773518827164ac481fb8876a914f5fb6147ff889a392211d0f0831a71137bedbff167064f505f323030064f505f4353567576a914cac5d03956494ffc17f78ea7b71189abf7f3593d6888ac
{
  "asm": "OP_IF OP_SHA256 a967bf5e8ca09e059d6bb7a3efa8f62190284649d3eab773518827164ac481fb OP_EQUALVERIFY OP_DUP OP_HASH160 f5fb6147ff889a392211d0f0831a71137bedbff1 OP_ELSE 4f505f323030 4f505f435356 OP_DROP OP_DUP OP_HASH160 cac5d03956494ffc17f78ea7b71189abf7f3593d OP_ENDIF OP_EQUALVERIFY OP_CHECKSIG",
  "type": "nonstandard",
  "p2sh": "33bzAemHYJdN1XciQGqj4v48F5YFinQGcY",
  "segwit": {
    "asm": "0 6b2b3b1c6a0f8c15b5cdac185339555ec0d537304b367f73ab615d55c9719607",
    "hex": "00206b2b3b1c6a0f8c15b5cdac185339555ec0d537304b367f73ab615d55c9719607",
    "reqSigs": 1,
    "type": "witness_v0_scripthash",
    "addresses": [
      "bc1qdv4nk8r2p7xptdwd4sv9xw24tmqd2desfvm87uatv9w4tjt3jcrs2a06tv"
    ],
    "p2sh-segwit": "3Erd7hDtmrGxvyEjcaqsARh8wfBfM9m4N5"
  }
}


As you can see, you can use the address 33bzAemHYJdN1XciQGqj4v48F5YFinQGcY in your transaction. If you would like to use segwit, you can use bc1qdv4nk8r2p7xptdwd4sv9xw24tmqd2desfvm87uatv9w4tjt3jcrs2a06tv.