am new at airflow and am trying to send messages to a discord server using airflow. I created the following dag to do it
from datetime import datetime
from airflow.models import DAG
from airflow.models import Variable
from airflow.providers.discord.operators.discord_webhook import DiscordWebhookOperator
with DAG('discord_alert', schedule_interval='@daily',
catchup=False,
tags=['discord']) as dag:
discord_alert = DiscordWebhookOperator(
task_id='discord_alert',
http_conn_id = Variable.get('discord_conn_id'),
webhook_endpoint = Variable.get('discord_webhook'),
message = 'teste',
)
[discord_alert]
Its returning the following error The conn_id isn't defined
Tried creating a discord connection with UI where Connection type==Discord