# (Very) Custom Smart Action

**URL:** <https://community.forestadmin.com/t/very-custom-smart-action/300>\
**Category:** Help me!\
**Created:** [May 25, 2020, 4:16pm UTC](https://community.forestadmin.com/t/very-custom-smart-action/300 "2020-05-25T16:16:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cyrielle\_Willerval](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/cyrielle_willerval/32/132_2.png) [@Cyrielle\_Willerval](https://community.forestadmin.com/u/Cyrielle_Willerval)\
**Post date:** [May 25, 2020, 4:16pm UTC](https://community.forestadmin.com/t/very-custom-smart-action/300/1 "2020-05-25T16:16:06Z")

</div>

I have a model Artist, which has a field “mainImageUrl”. It is the principal image of the artist.

The image urls can be obtained by a call to the server, because they are from different sources and not all are stored in the database.

I want to create a smart action to choose the image. I want to call my server, get the images urls, display the images and their urls to the user, so he could choose which url is the main.

Can I do that with a smart action? Or something else if you have an idea 🙂

Thank you very much!

---

<div class="post-metadata">

**Author:** ![arnaud](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud/32/32_2.png) [@arnaud](https://community.forestadmin.com/u/arnaud)\
**Post date:** [May 25, 2020, 5:03pm UTC](https://community.forestadmin.com/t/very-custom-smart-action/300/2 "2020-05-25T17:03:15Z")

</div>

Hi @Cyrielle_Willerval,

I am not sure you can do something friendly with a simple Smart Action.  
Unfortunately, we do not provide multi step Smart Actions yet.

A general idea could be to:

1. Create a Smart Relationship `Artist hasMany Images`.
2. Access this relationship from an `Artist` detail page.
3. Make all the pictures displayed (in the related data list), configuring the image url field with the file viewer widget.
4. Create a Smart Action “Set user main image” to set the “mainImageUrl” of a user (on the “image” collection).
5. Select the picture you want in the related data and trigger the “Set user main image”

Does it make sense?

---

<div class="post-metadata">

**Author:** ![Cyrielle\_Willerval](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/cyrielle_willerval/32/132_2.png) [@Cyrielle\_Willerval](https://community.forestadmin.com/u/Cyrielle_Willerval)\
**Post date:** [May 25, 2020, 5:05pm UTC](https://community.forestadmin.com/t/very-custom-smart-action/300/3 "2020-05-25T17:05:29Z")

</div>

The images are not the database, because they are updated very often from another application. So I don’t think I can display it with the related data

But thank you for your answer!

---

<div class="post-metadata">

**Author:** ![arnaud](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud/32/32_2.png) [@arnaud](https://community.forestadmin.com/u/arnaud)\
**Post date:** [May 26, 2020, 6:15am UTC](https://community.forestadmin.com/t/very-custom-smart-action/300/4 "2020-05-26T06:15:00Z")

</div>

Smart Relationships can be implemented with any type of sources:

- database for native collections
- but also APIs for integration with 3rd party services (Stripe, Intercom, Mixpanel…)

I see no limitation in the fact that those images are not in your main database.

---

<div class="post-metadata">

**Author:** ![Cyrielle\_Willerval](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/cyrielle_willerval/32/132_2.png) [@Cyrielle\_Willerval](https://community.forestadmin.com/u/Cyrielle_Willerval)\
**Post date:** [May 26, 2020, 9:04am UTC](https://community.forestadmin.com/t/very-custom-smart-action/300/5 "2020-05-26T09:04:49Z")

</div>

Ahh I did not know that, it seems great!
