Hi!
I think in this case I would first set up a new debt repayment envelope for the loan, and then add the amount you received to the account from which you pay bills as “new income”. That settles the loan and the cash flow question. Then you can make a payment to your credit card by doing an account transfer from the newly-filled payment account to the credit card account for the full amount.
I hope that helps!