# How to create and attach a file to and entity, using a script?

**URL:** <https://community.fibery.io/t/how-to-create-and-attach-a-file-to-and-entity-using-a-script/5744>\
**Category:** Get Help\
**Created:** [January 24, 2024, 11:30am UTC](https://community.fibery.io/t/how-to-create-and-attach-a-file-to-and-entity-using-a-script/5744 "2024-01-24T11:30:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuri\_BC](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/yuri_bc/32/8803_2.png) [@Yuri\_BC](https://community.fibery.io/u/Yuri_BC)\
**Post date:** [January 24, 2024, 11:30am UTC](https://community.fibery.io/t/how-to-create-and-attach-a-file-to-and-entity-using-a-script/5744/1 "2024-01-24T11:30:19Z")

</div>

I see the Fibery API Documentation page indicates the ability to upload and download files, but not to create a file programmatically.

[https://the.fibery.io/@public/User\_Guide/Guide/File-API-265](https://the.fibery.io/@public/User_Guide/Guide/File-API-265)

My goal is to create and attach files which contains:

- Text received from external API services (like AI models)
- Text present in entity rich text fields (like the Description field)

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [January 24, 2024, 11:38am UTC](https://community.fibery.io/t/how-to-create-and-attach-a-file-to-and-entity-using-a-script/5744/2 "2024-01-24T11:38:11Z")

</div>

The Fibery API is designed to allow you to query and update the contents of a Fibery workspace. As you say, this includes uploading an downloading files.  
If you want to create files, this is something that you would need to do externally. There are no doubt lots of services which have APIs for making files from source data, or you could [write your own](https://www.w3schools.com/nodejs/nodejs_filesystem.asp).

Within Fibery automations, it is possible to [create PDF files](https://the.fibery.io/@public/User_Guide/Guide/Generate-PDF-File-using-Button-212) as attachments to an entity, but that is the only format supported.
