Hi, I am developing an MS Teams bot using Node.js and Airtable REST API, the bot fetches the information from Airtable and sends it to the MS team’s bot.
I’m facing a problem when sending the video attachments.
This is the code that I use to fetch the attachment record:
const records = await base(table_name).select({
view: "Grid view",
}).all(
);
records.forEach(async function (record) {
files= record.get("Attachments") //Attachments is the field name
console.log(files)
const reply = { type: ActivityTypes.Message };
reply.attachments = [await getInternetAttachment(files.url)];
turnContext.sendActivity(reply)
})
[
{
id: 'attAm7ezFldMnS7uC',
url: file_url,
filename: 'SampleVideo_1280x720_10mb.mp4',
size: 10498677,
type: 'video/mp4'
}
]
When I redirect to the output URL, the video doesn’t load which causes issues in sending the video files to the bot.
Is this how the attachment links work when fetched using Airtable REST API? I need to extract a working URL in order to send video attachments to the bot.